summaryrefslogtreecommitdiffstats
path: root/robot/resources/bc_interface.robot
diff options
context:
space:
mode:
authorpkaras <piotr.karas@nokia.com>2019-04-10 11:56:50 +0200
committerpkaras <piotr.karas@nokia.com>2019-04-18 07:50:55 +0200
commit2771fdaa953bbbd6780ddc1d00ed18845a3fa370 (patch)
tree1cf8034e9fc3c0f73ff790e44b1e5673e65b7ef7 /robot/resources/bc_interface.robot
parente12b626ab2141e59d74314dc24713b295dac9d53 (diff)
tests for bus controller
Change-Id: Ib21382bc74832c223d87bd193c030428b6a8b6e4 Issue-ID: DMAAP-1114 Signed-off-by: piotr.karas <piotr.karas@nokia.com>
Diffstat (limited to 'robot/resources/bc_interface.robot')
-rw-r--r--robot/resources/bc_interface.robot29
1 files changed, 29 insertions, 0 deletions
diff --git a/robot/resources/bc_interface.robot b/robot/resources/bc_interface.robot
new file mode 100644
index 00000000..6aa2a3b9
--- /dev/null
+++ b/robot/resources/bc_interface.robot
@@ -0,0 +1,29 @@
+*** Settings ***
+Documentation The main interface for interacting with Bus Controller.
+Library RequestsClientCert
+Library RequestsLibrary
+Library UUID
+
+Resource global_properties.robot
+
+*** Variables ***
+${BC_HEALTH_CHECK_PATH} /webapi/dmaap
+${BC_HTTPS_ENDPOINT} https://${GLOBAL_INJECTED_BC_IP_ADDR}:${GLOBAL_BC_HTTPS_SERVER_PORT}
+
+
+*** Keywords ***
+Run BC Health Check With Basic Auth
+ [Documentation] Runs dmmap details check
+ ${resp}= Return dmaap details with basic auth ${BC_HEALTH_CHECK_PATH}
+ Should Be Equal As Strings ${resp.status_code} 200
+
+
+Return dmaap details with basic auth
+ [Documentation] Runs Bus Controler get details request with basic authentication
+ [Arguments] ${data_path}
+ ${auth}= Create List ${GLOBAL_BC_USERNAME} ${GLOBAL_BC_PASSWORD}
+ ${session}= Create Session bs ${BC_HTTPS_ENDPOINT} auth=${auth}
+ ${resp}= Get Request bs ${data_path}
+ Log Received response from bus controller ${resp.text}
+ [Return] ${resp}
+