blob: 6d30aa04b2eb66efc52f4d0c81574135cf89083d [file] [log] [blame]
GuangrongFud5bc0b82018-10-16 17:59:57 +08001*** Settings ***
2Library RequestsLibrary
3Resource 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 ***
11Run 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
16Run 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
21Run 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}