GuangrongFu | d5bc0b8 | 2018-10-16 17:59:57 +0800 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Library RequestsLibrary |
| 3 | Resource global_properties.robot |
| 4 | |
| 5 | *** Variables *** |
| 6 | ${MSB_ENDPOINT} ${GLOBAL_MSB_SERVER_PROTOCOL}://${GLOBAL_INJECTED_MSB_IP_ADDR}:${GLOBAL_MSB_SERVER_PORT} |
| 7 | ${HOLMES_RULE_HEALTH_CHECK} /api/holmes-rule-mgmt/v1/healthcheck |
| 8 | ${HOLMES_ENGINE_HEALTH_CHECK} /api/holmes-engine-mgmt/v1/healthcheck |
| 9 | |
| 10 | *** Keywords *** |
| 11 | Run Holmes Rule Mgmt Healthcheck |
| 12 | [Documentation] Run Holmes Rule Management Health Check |
| 13 | ${resp}= Run Holmes Get Request ${HOLMES_RULE_HEALTH_CHECK} |
| 14 | Should Be Equal As Integers ${resp.status_code} 200 |
| 15 | |
| 16 | Run Holmes Engine Mgmt Healthcheck |
| 17 | [Documentation] Run Holmes Engine Management Health Check |
| 18 | ${resp}= Run Holmes Get Request ${HOLMES_ENGINE_HEALTH_CHECK} |
| 19 | Should Be Equal As Integers ${resp.status_code} 200 |
| 20 | |
| 21 | Run Holmes Get Request |
| 22 | [Arguments] ${data_path} |
| 23 | [Documentation] Runs Holmes Get request |
| 24 | ${session}= Create Session holmes ${MSB_ENDPOINT} |
| 25 | ${resp}= Get Request holmes ${data_path} |
| 26 | Should Be Equal As Integers ${resp.status_code} 200 |
| 27 | Log Received response from server ${resp.text} |
| 28 | [Return] ${resp} |