Eric Debeau | 9045a1e | 2018-04-24 17:22:41 +0000 | [diff] [blame^] | 1 | *** Settings *** |
| 2 | Documentation The main interface for interacting with OOF |
| 3 | Library RequestsLibrary |
| 4 | |
| 5 | Resource global_properties.robot |
| 6 | |
| 7 | *** Variables *** |
| 8 | ${OOF_HEALTH_CHECK_PATH} /api/oof/v1/healthcheck |
| 9 | ${OOF_ENDPOINT} ${GLOBAL_OOF_SERVER_PROTOCOL}://${GLOBAL_INJECTED_OOF_IP_ADDR}:${GLOBAL_OOF_SERVER_PORT} |
| 10 | |
| 11 | |
| 12 | *** Keywords *** |
| 13 | Run OOF Health Check |
| 14 | [Documentation] Runs OOF Health check |
| 15 | ${resp}= Run OOF Get Request ${OOF_HEALTH_CHECK_PATH} |
| 16 | Should Be Equal As Integers ${resp.status_code} 200 |
| 17 | |
| 18 | Run OOF Get Request |
| 19 | [Documentation] Runs OOF Get request |
| 20 | [Arguments] ${data_path} |
| 21 | ${session}= Create Session session ${OOF_ENDPOINT} |
| 22 | ${resp}= Get Request session ${data_path} |
| 23 | Should Be Equal As Integers ${resp.status_code} 200 |
| 24 | Log Received response from OOF ${resp.text} |
| 25 | [Return] ${resp} |