blob: fab3694e442486aaf50a294caebb4a4939a301a4 [file] [log] [blame]
Gary Wu9abb61c2018-09-27 10:38:50 -07001*** settings ***
2Resource ../../common.robot
3Library Collections
4Library RequestsLibrary
5Library simplejson
6Library OperatingSystem
7Library json
8Library HttpLibrary.HTTP
9
10*** Variables ***
11@{return_ok_list}= 200 201 202
12${queryswagger_url} /api/multivimproxy/v1/swagger.json
13
14*** Test Cases ***
15SwaggerFuncTest
16 [Documentation] query swagger info rest test
17 ${headers} Create Dictionary Content-Type=application/json Accept=application/json
18 Create Session web_session http://${RESMGR_IP}:8481 headers=${headers}
19 ${resp}= Get Request web_session ${queryswagger_url}
20 ${responese_code}= Convert To String ${resp.status_code}
21 List Should Contain Value ${return_ok_list} ${responese_code}
22 ${response_json} json.loads ${resp.content}
23 ${swagger_version}= Convert To String ${response_json['swagger']}
24 Should Be Equal ${swagger_version} 2.0