blob: 29aa10a523403d10170aec423ff075ea7cbd82b7 [file] [log] [blame]
Mariusz Wagner5bce6d92019-02-20 14:34:49 +01001*** Settings ***
Gary Wu9abb61c2018-09-27 10:38:50 -07002Library Collections
3Library RequestsLibrary
4Library OperatingSystem
5Library json
6
7*** Variables ***
8@{return_ok_list}= 200 201 202
9${queryswagger_url} /api/emsdriver/v1/swagger.json
10
11*** Test Cases ***
12EMSDriverSwaggerTest
13 [Documentation] query swagger info of emsdriver
14 ${headers} Create Dictionary Content-Type=application/json Accept=application/json
15 Create Session web_session http://${EMS_DRV_IP}:8206 headers=${headers}
16 ${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