aboutsummaryrefslogtreecommitdiffstats
path: root/robot/resources/dr_interface.robot
diff options
context:
space:
mode:
authoreconwar <conor.ward@ericsson.com>2018-09-03 13:47:00 +0000
committereconwar <conor.ward@ericsson.com>2018-09-03 14:44:48 +0000
commitd7400a150b94cd7a1ded43f8ce63130fa168d827 (patch)
treee996fa3539c6958edf47fb7e099d8183d54a55ea /robot/resources/dr_interface.robot
parentc43172bf0403a08be70ac199a18e0ed044c14782 (diff)
Add healthcheck for Data-Router
Change-Id: Iac47da320ad763ed3798231b9b035cb8f8b28d5d Signed-off-by: Conor Ward <conor.ward@ericsson.com> Issue-ID: DMAAP-709
Diffstat (limited to 'robot/resources/dr_interface.robot')
-rw-r--r--robot/resources/dr_interface.robot24
1 files changed, 24 insertions, 0 deletions
diff --git a/robot/resources/dr_interface.robot b/robot/resources/dr_interface.robot
new file mode 100644
index 00000000..ff57435e
--- /dev/null
+++ b/robot/resources/dr_interface.robot
@@ -0,0 +1,24 @@
+*** Settings ***
+Documentation The main interface for interacting with Data-Router.
+Library RequestsLibrary
+
+Resource global_properties.robot
+
+*** Variables ***
+${DR_HEALTH_CHECK_PATH} /internal/fetchProv
+${DR_ENDPOINT} ${GLOBAL_DMAAP_DR_NODE_SERVER_PROTOCOL}://${GLOBAL_INJECTED_DMAAP_DR_NODE_IP_ADDR}:${GLOBAL_DMAAP_DR_NODE_SERVER_PORT}
+
+
+*** Keywords ***
+Run DR Health Check
+ [Documentation] Runs DR Health check
+ ${resp}= Run DR Get Request ${DR_HEALTH_CHECK_PATH}
+ Should Be Equal As Strings ${resp.status_code} 204
+
+Run DR Get Request
+ [Documentation] Runs DR Get request
+ [Arguments] ${data_path}
+ ${session}= Create Session session ${DR_ENDPOINT}
+ ${resp}= Get Request session ${data_path}
+ Log Received response from data router ${resp.text}
+ [Return] ${resp}