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