Bin Sun | 197208b | 2018-03-29 01:40:31 -0700 | [diff] [blame^] | 1 | *** settings *** |
| 2 | Resource ../../common.robot |
| 3 | Library Collections |
| 4 | Library RequestsLibrary |
| 5 | Library OperatingSystem |
| 6 | Library json |
| 7 | Library HttpLibrary.HTTP |
| 8 | |
| 9 | |
| 10 | *** Variables *** |
| 11 | @{return_ok_list}= 200 201 202 |
| 12 | |
| 13 | |
| 14 | *** Test Cases *** |
| 15 | |
| 16 | TestGetHost |
| 17 | [Documentation] Sanity Test - Get Image |
| 18 | ${headers} Create Dictionary Content-Type=application/json Accept=application/json |
| 19 | Create Session web_session http://${VIO_IP}:9004 headers=${headers} |
| 20 | ${resp}= Get Request web_session api/multicloud-vio/v0/vmware_fake/1234/images/1 |
| 21 | ${response_code}= Convert To String ${resp.status_code} |
| 22 | List Should Contain Value ${return_ok_list} ${response_code} |
| 23 | ${response_json} json.loads ${resp.content} |
| 24 | #Log To Console ${response_json} |