blob: e1a57760d2a6e19187339ce2b958b25d508a69ee [file] [log] [blame]
fujinhuafe9b4492017-09-13 10:04:43 +08001*** settings ***
2Library Collections
3Library RequestsLibrary
4Library OperatingSystem
5Library json
6
7*** Variables ***
8@{return_ok_list}= 200 201 202
yangyan14762cb2017-10-13 11:48:16 +08009${queryswagger_url} /api/emsdriver/v1/swagger.json
fujinhuafe9b4492017-09-13 10:04:43 +080010
11*** Test Cases ***
12EMSDriverSwaggerTest
13 [Documentation] query swagger info of emsdriver
14 ${headers} Create Dictionary Content-Type=application/json Accept=application/json
yangyan14762cb2017-10-13 11:48:16 +080015 Create Session web_session http://${EMS_DRV_IP}:8206 headers=${headers}
yangyan66025702017-09-26 17:37:55 +080016 ${resp}= Get Request web_session ${queryswagger_url}
17 ${responese_code}= Convert To String ${resp.status_code}
yangyan14762cb2017-10-13 11:48:16 +080018 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
yangyan66025702017-09-26 17:37:55 +080022
23EMSDriverSwaggerByMSBTest
24 [Documentation] query swagger info of emsdriver by MSB
25 ${headers} Create Dictionary Content-Type=application/json Accept=application/json
26 Create Session web_session http://${MSB_IAG_IP}:80 headers=${headers}
27 ${resp}= Get Request web_session ${queryswagger_url}
28 ${responese_code}= Convert To String ${resp.status_code}
yangyana7cf7472017-10-12 10:31:06 +080029 Should Be Equal 2.0 2.0
30
31