blob: fcb784b278146d202978f438dc3f67b75721e5b1 [file] [log] [blame]
liangkea2e5a702018-03-29 17:55:04 +08001*** settings ***
2Library Collections
3Library RequestsLibrary
4Library OperatingSystem
5Library json
6
7*** Variables ***
8@{return_ok_list}= 200 201 202
9${querysample_vio_url} /samples
10
11*** Test Cases ***
12VioSwaggerTest
13 [Documentation] query swagger info rest test
14 ${headers} Create Dictionary Content-Type=application/json X-TRANSACTIONID=123456 Accept=application/json
15 Create Session web_session http://${VIO_IP}:9004 headers=${headers}
16 ${resp}= Get Request web_session ${querysample_vio_url}
17 ${responese_code}= Convert To String ${resp.status_code}
18 List Should Contain Value ${return_ok_list} ${responese_code}
19 # verify logging output
20 ${response_json} json.loads ${resp.content}
21 ${logs}= Convert To String ${response_json['logs']}
22 Log To Console ${logs}
23 Should Contain ${logs} 123456
24 Should Contain ${logs} multicloud-vio
25 Should Contain ${logs} vio.samples.views