blob: 148856cb7441bb7efd1f836c7ff736fbe5ae00e7 [file] [log] [blame]
fujinhua79b58a92017-09-04 19:12:01 +08001*** settings ***
2Library Collections
3Library RequestsLibrary
4Library OperatingSystem
5Library json
6
7*** Variables ***
8@{return_ok_list}= 200 201 202
9${queryswagger_url} /api/nslcm/v1/swagger.json
10
11*** Test Cases ***
12NslcmSwaggerTest
fujinhua8fea9bb2017-09-08 09:26:34 +080013 [Documentation] query swagger info nslcm
14 ${headers} Create Dictionary Content-Type=application/json Accept=application/json
fujinhuafef3f742017-09-09 15:55:18 +080015 Create Session web_session http://${NSLCM_IP}:8403 headers=${headers}
fujinhua8fea9bb2017-09-08 09:26:34 +080016 ${resp}= Get Request web_session ${queryswagger_url}
17 ${responese_code}= Convert To String ${resp.status_code}
18 List Should Contain Value ${return_ok_list} ${responese_code}
19 ${response_json} json.loads ${resp.content}
20 ${swagger_version}= Convert To String ${response_json['swagger']}
21 Should Be Equal ${swagger_version} 2.0