aboutsummaryrefslogtreecommitdiffstats
path: root/robot/resources
diff options
context:
space:
mode:
authorGuangrongFu <fu.guangrong@zte.com.cn>2018-10-16 17:59:57 +0800
committerGuangrongFu <fu.guangrong@zte.com.cn>2018-10-16 17:59:57 +0800
commitd5bc0b81b17e0751e13271e9c3907789175ffdff (patch)
tree485a150fa59e917c577f9acd1bcbc4572fd4c861 /robot/resources
parent021d5eb12ccb2ea6d44fd703cf0e56beb157429c (diff)
Added Health Check for Holmes
Change-Id: I4bc4c1832e1fe20066f16c719631c40af0ef5788 Issue-ID: HOLMES-176 Signed-off-by: GuangrongFu <fu.guangrong@zte.com.cn>
Diffstat (limited to 'robot/resources')
-rw-r--r--robot/resources/holmes_interface.robot28
1 files changed, 28 insertions, 0 deletions
diff --git a/robot/resources/holmes_interface.robot b/robot/resources/holmes_interface.robot
new file mode 100644
index 00000000..6d30aa04
--- /dev/null
+++ b/robot/resources/holmes_interface.robot
@@ -0,0 +1,28 @@
+*** Settings ***
+Library RequestsLibrary
+Resource global_properties.robot
+
+*** Variables ***
+${MSB_ENDPOINT} ${GLOBAL_MSB_SERVER_PROTOCOL}://${GLOBAL_INJECTED_MSB_IP_ADDR}:${GLOBAL_MSB_SERVER_PORT}
+${HOLMES_RULE_HEALTH_CHECK} /api/holmes-rule-mgmt/v1/healthcheck
+${HOLMES_ENGINE_HEALTH_CHECK} /api/holmes-engine-mgmt/v1/healthcheck
+
+*** Keywords ***
+Run Holmes Rule Mgmt Healthcheck
+ [Documentation] Run Holmes Rule Management Health Check
+ ${resp}= Run Holmes Get Request ${HOLMES_RULE_HEALTH_CHECK}
+ Should Be Equal As Integers ${resp.status_code} 200
+
+Run Holmes Engine Mgmt Healthcheck
+ [Documentation] Run Holmes Engine Management Health Check
+ ${resp}= Run Holmes Get Request ${HOLMES_ENGINE_HEALTH_CHECK}
+ Should Be Equal As Integers ${resp.status_code} 200
+
+Run Holmes Get Request
+ [Arguments] ${data_path}
+ [Documentation] Runs Holmes Get request
+ ${session}= Create Session holmes ${MSB_ENDPOINT}
+ ${resp}= Get Request holmes ${data_path}
+ Should Be Equal As Integers ${resp.status_code} 200
+ Log Received response from server ${resp.text}
+ [Return] ${resp}