blob: 73dec481d8b4430c45cbd93cdfc69f5d2864c2c0 [file] [log] [blame]
GuangrongFud5bc0b82018-10-16 17:59:57 +08001*** Settings ***
2Library RequestsLibrary
3Resource global_properties.robot
4
5*** Variables ***
GuangrongFud5bc0b82018-10-16 17:59:57 +08006${HOLMES_RULE_HEALTH_CHECK} /api/holmes-rule-mgmt/v1/healthcheck
7${HOLMES_ENGINE_HEALTH_CHECK} /api/holmes-engine-mgmt/v1/healthcheck
8
Andreas Geissler3d6a7d92023-03-02 10:01:27 +01009${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
GuangrongFud5bc0b82018-10-16 17:59:57 +080012*** Keywords ***
13Run Holmes Rule Mgmt Healthcheck
14 [Documentation] Run Holmes Rule Management Health Check
Andreas Geissler3d6a7d92023-03-02 10:01:27 +010015 ${resp}= Run Holmes Get Request ${HOLMES_RULE_ENDPOINT} ${HOLMES_RULE_HEALTH_CHECK}
GuangrongFud5bc0b82018-10-16 17:59:57 +080016 Should Be Equal As Integers ${resp.status_code} 200
17
18Run Holmes Engine Mgmt Healthcheck
19 [Documentation] Run Holmes Engine Management Health Check
Andreas Geissler3d6a7d92023-03-02 10:01:27 +010020 ${resp}= Run Holmes Get Request ${HOLMES_ENGINE_ENDPOINT} ${HOLMES_ENGINE_HEALTH_CHECK}
GuangrongFud5bc0b82018-10-16 17:59:57 +080021 Should Be Equal As Integers ${resp.status_code} 200
22
23Run Holmes Get Request
Andreas Geissler3d6a7d92023-03-02 10:01:27 +010024 [Arguments] ${endpoint} ${data_path}
GuangrongFud5bc0b82018-10-16 17:59:57 +080025 [Documentation] Runs Holmes Get request
Andreas Geissler3d6a7d92023-03-02 10:01:27 +010026 ${session}= Create Session holmes ${endpoint}
GuangrongFud5bc0b82018-10-16 17:59:57 +080027 ${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}