Add CDS Blueprint Processor health-check to robot 56/93256/3
authorAbdelmuhaimen Seaudi <abdelmuhaimen.seaudi@orange.com>
Sat, 10 Aug 2019 08:20:52 +0000 (08:20 +0000)
committerAbdelmuhaimen Seaudi <abdelmuhaimen.seaudi@orange.com>
Tue, 13 Aug 2019 19:26:51 +0000 (19:26 +0000)
Issue-ID: TEST-193
Signed-off-by: Abdelmuhaimen Seaudi <abdelmuhaimen.seaudi@orange.com>
Change-Id: I459a1e74401105ac029b417aee6604aa2f462fed
Signed-off-by: Abdelmuhaimen Seaudi <abdelmuhaimen.seaudi@orange.com>
robot/resources/cds_interface.robot [new file with mode: 0644]
robot/testsuites/health-check.robot

diff --git a/robot/resources/cds_interface.robot b/robot/resources/cds_interface.robot
new file mode 100644 (file)
index 0000000..ee2911d
--- /dev/null
@@ -0,0 +1,24 @@
+*** Settings ***
+Documentation     The main interface for interacting with CDS. It handles low level stuff like managing the http request library and CDS required fields
+Library               RequestsLibrary
+Library           ONAPLibrary.Utilities
+Library           OperatingSystem
+Library           Collections
+Resource          global_properties.robot
+
+*** Variables ***
+${CDS_HEALTH_CHECK_PATH}    /api/v1/execution-service/health-check 
+${CDS_HEALTH_ENDPOINT}     ${GLOBAL_CCSDK_CDS_SERVER_PROTOCOL}://${GLOBAL_INJECTED_CCSDK_CDS_BLUEPRINT_PROCESSOR_IP_ADDR}:${GLOBAL_CCSDK_CDS_HEALTH_SERVER_PORT}
+
+*** Keywords ***
+Run CDS Health Check
+    [Documentation]    Runs a CDS health check
+    ${auth}=  Create List  ${GLOBAL_CCSDK_CDS_USERNAME}    ${GLOBAL_CCSDK_CDS_PASSWORD}
+    Log    Creating session ${CDS_HEALTH_ENDPOINT}
+    ${session}=    Create Session       cds    ${CDS_HEALTH_ENDPOINT}    auth=${auth}
+    ${headers}=  Create Dictionary    Accept=application/json    Content-Type=application/json
+    ${resp}=    Get Request     cds    ${CDS_HEALTH_CHECK_PATH}     headers=${headers}
+    Log    Received response code from cds ${resp}
+    Log    Received content from cds ${resp.content}
+    Should Be Equal As Strings  ${resp.status_code}     200
+
index 59c14db..51be053 100644 (file)
@@ -27,6 +27,7 @@ Resource          ../resources/sms_interface.robot
 Resource          ../resources/dr_interface.robot
 Resource          ../resources/pomba_interface.robot
 Resource          ../resources/holmes_interface.robot
+Resource          ../resources/cds_interface.robot
 
 
 *** Test Cases ***
@@ -304,3 +305,7 @@ Basic Multicloud-fcaps API Health Check
 Basic Modeling genericparser API Health Check
     [Tags]    health    api   health-modeling
     Run MSB Get Request    /api/parser/v1/health_check
+
+Basic CDS Health Check
+    [Tags]    health    medium   health-cds
+    Run CDS Health Check