aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2017-10-23 09:51:13 -0700
committerGary Wu <gary.i.wu@huawei.com>2017-10-23 09:55:52 -0700
commitba8f94de3e8a063c911b52e6bd8225cc67fc01da (patch)
tree688009b553f6b4548d7d337037be8bf26a473cbc
parent85b749bac23adde11ea1f69ced2b4cffbddd0564 (diff)
Add health check for CLAMP
Change-Id: I8828ae271dc89a43c6d91fc3e108f07278696965 Issue-ID: INT-294 Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
-rw-r--r--robot/resources/clamp_interface.robot25
-rw-r--r--robot/testsuites/health-check.robot5
2 files changed, 30 insertions, 0 deletions
diff --git a/robot/resources/clamp_interface.robot b/robot/resources/clamp_interface.robot
new file mode 100644
index 00000000..85a8c9e9
--- /dev/null
+++ b/robot/resources/clamp_interface.robot
@@ -0,0 +1,25 @@
+*** Settings ***
+Documentation The main interface for interacting with Microservice Bus.
+Library RequestsLibrary
+
+Resource global_properties.robot
+
+*** Variables ***
+${CLAMP_HEALTH_CHECK_PATH} /restservices/clds/v1/clds/healthcheck
+${CLAMP_ENDPOINT} ${GLOBAL_CLAMP_SERVER_PROTOCOL}://${GLOBAL_INJECTED_CLAMP_IP_ADDR}:${GLOBAL_CLAMP_SERVER_PORT}
+
+
+*** Keywords ***
+Run CLAMP Health Check
+ [Documentation] Runs CLAMP Health check
+ ${resp}= Run CLAMP Get Request ${CLAMP_HEALTH_CHECK_PATH}
+ Should Be Equal As Integers ${resp.status_code} 200
+
+Run CLAMP Get Request
+ [Documentation] Runs CLAMP Get request
+ [Arguments] ${data_path}
+ ${session}= Create Session session ${CLAMP_ENDPOINT}
+ ${resp}= Get Request session ${data_path}
+ Should Be Equal As Integers ${resp.status_code} 200
+ Log Received response from CLAMP ${resp.text}
+ [Return] ${resp}
diff --git a/robot/testsuites/health-check.robot b/robot/testsuites/health-check.robot
index f6eb60ea..fcf221dd 100644
--- a/robot/testsuites/health-check.robot
+++ b/robot/testsuites/health-check.robot
@@ -15,6 +15,7 @@ Resource ../resources/portal_interface.robot
Resource ../resources/mr_interface.robot
Resource ../resources/aaf_interface.robot
Resource ../resources/msb_interface.robot
+Resource ../resources/clamp_interface.robot
*** Test Cases ***
Basic DCAE Health Check
@@ -61,6 +62,10 @@ Basic Microservice Bus Health Check
[Tags] health
Run MSB Health Check
+Basic CLAMP Health Check
+ [Tags] health
+ Run CLAMP Health Check
+
catalog API Health Check
[Tags] health
Run MSB Get Request /api/catalog/v1/swagger.json