blob: 1c3137e4317745e2a9c5c3c028045386a19c5c73 [file] [log] [blame]
Eric Debeau9045a1e2018-04-24 17:22:41 +00001*** Settings ***
Eric Debeauca1b9c82018-04-24 20:41:02 +00002Documentation The main interface for interacting with OOF: SNIRO and Homing Service
Eric Debeau9045a1e2018-04-24 17:22:41 +00003Library RequestsLibrary
4
5Resource global_properties.robot
6
7*** Variables ***
Eric Debeauca1b9c82018-04-24 20:41:02 +00008${OOF_HOMING_HEALTH_CHECK_PATH} /v1/plans/healthcheck
9${OOF_SNIRO_HEALTH_CHECK_PATH} /api/oof/v1/healthcheck
Eric Debeau9045a1e2018-04-24 17:22:41 +000010
Gary Wu251aa682018-07-30 15:22:20 -070011${OOF_HOMING_ENDPOINT} ${GLOBAL_OOF_SERVER_PROTOCOL}://${GLOBAL_INJECTED_OOF_HOMING_IP_ADDR}:${GLOBAL_OOF_HOMING_SERVER_PORT}
12${OOF_SNIRO_ENDPOINT} ${GLOBAL_OOF_SERVER_PROTOCOL}://${GLOBAL_INJECTED_OOF_SNIRO_IP_ADDR}:${GLOBAL_OOF_SNIRO_SERVER_PORT}
Eric Debeau9045a1e2018-04-24 17:22:41 +000013
14*** Keywords ***
Eric Debeauca1b9c82018-04-24 20:41:02 +000015Run OOF-Homing Health Check
16 [Documentation] Runs OOF-Homing Health check
17 ${resp}= Run OOF-Homing Get Request ${OOF_HOMING_HEALTH_CHECK_PATH}
Eric Debeau9045a1e2018-04-24 17:22:41 +000018 Should Be Equal As Integers ${resp.status_code} 200
19
Eric Debeauca1b9c82018-04-24 20:41:02 +000020Run OOF-Homing Get Request
21 [Documentation] Runs OOF-Homing Get request
Eric Debeau9045a1e2018-04-24 17:22:41 +000022 [Arguments] ${data_path}
Eric Debeauca1b9c82018-04-24 20:41:02 +000023 ${session}= Create Session session ${OOF_HOMING_ENDPOINT}
Eric Debeau9045a1e2018-04-24 17:22:41 +000024 ${resp}= Get Request session ${data_path}
25 Should Be Equal As Integers ${resp.status_code} 200
Eric Debeauca1b9c82018-04-24 20:41:02 +000026 Log Received response from OOF-Homing ${resp.text}
27 [Return] ${resp}
28
29Run OOF-SNIRO Health Check
30 [Documentation] Runs OOF-SNIRO Health check
31 ${resp}= Run OOF-SNIRO Get Request ${OOF_SNIRO_HEALTH_CHECK_PATH}
32 Should Be Equal As Integers ${resp.status_code} 200
33
34Run OOF-SNIRO Get Request
35 [Documentation] Runs OOF-SNIRO Get request
36 [Arguments] ${data_path}
37 ${session}= Create Session session ${OOF_SNIRO_ENDPOINT}
38 ${resp}= Get Request session ${data_path}
39 Should Be Equal As Integers ${resp.status_code} 200
40 Log Received response from OOF-SNIRO ${resp.text}
Eric Debeau9045a1e2018-04-24 17:22:41 +000041 [Return] ${resp}