Add DCAE Microservice Health Check 78/118878/2
authorJack Lucas <jflos@sonoris.net>
Sat, 6 Mar 2021 18:54:40 +0000 (13:54 -0500)
committerMorgan Richomme <morgan.richomme@orange.com>
Wed, 24 Mar 2021 14:00:59 +0000 (14:00 +0000)
Issue-ID: DCAEGEN2-2660
Signed-off-by: Jack Lucas <jflos@sonoris.net>
Change-Id: I0f7488008e7595e493176138b5f449b33ddb0f1b

robot/resources/dcae_ms_interface.robot [new file with mode: 0644]
robot/testsuites/health-check.robot
version.properties

diff --git a/robot/resources/dcae_ms_interface.robot b/robot/resources/dcae_ms_interface.robot
new file mode 100644 (file)
index 0000000..a32bdcf
--- /dev/null
@@ -0,0 +1,24 @@
+*** Settings ***
+Documentation     The main interface for interacting with DCAE Helm-deployed microservices. It handles low level stuff like managing the http request library and DCAE required fields
+Library              RequestsLibrary
+Library                  ONAPLibrary.Utilities
+Library           OperatingSystem
+Library           Collections
+Resource          global_properties.robot
+
+*** Variables ***
+${DCAE_MS_HEALTH_CHECK_PATH}    /healthcheck
+${DCAE_MS_HEALTH_ENDPOINT}     ${GLOBAL_DCAE_MS_SERVER_PROTOCOL}://${GLOBAL_INJECTED_DCAE_MS_IP_ADDR}:${GLOBAL_DCAE_MS_HEALTH_SERVER_PORT}
+
+*** Keywords ***
+Run DCAE Microservices Health Check
+    [Documentation]    Runs a DCAE Microservices health check
+    ${auth}=  Create List  ${GLOBAL_DCAE_MS_USERNAME}    ${GLOBAL_DCAE_MS_PASSWORD}
+    Log    Creating session ${DCAE_MS_HEALTH_ENDPOINT}
+    ${session}=    Create Session      dcae    ${DCAE_MS_HEALTH_ENDPOINT}    auth=${auth}
+    ${uuid}=    Generate UUID4
+    ${headers}=  Create Dictionary     X-ECOMP-Client-Version=ONAP-R2   action=getTable    Accept=application/json    Content-Type=application/json    X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid}    X-FromAppId=${GLOBAL_APPLICATION_ID}
+    ${resp}=   Get Request     dcae    ${DCAE_MS_HEALTH_CHECK_PATH}     headers=${headers}
+    Log    Received response code from dcae ${resp}
+    Log    Received content from dcae ${resp.content}
+    Should Be Equal As Strings         ${resp.status_code}     200
index 92335d6..9344e5a 100644 (file)
@@ -28,6 +28,7 @@ Resource          ../resources/dr_interface.robot
 Resource          ../resources/pomba_interface.robot
 Resource          ../resources/holmes_interface.robot
 Resource          ../resources/cds_interface.robot
+Resource          ../resources/dcae_ms_interface.robot
 
 
 *** Test Cases ***
@@ -64,6 +65,10 @@ Basic DCAE Health Check
     [Tags]    health    medium   health-dcaegen2
     Run DCAE Health Check
 
+Basic DCAE Microservices Health Check
+    [Tags]    health    medium   health-dcaegen2-services
+    Run DCAE Microservices Health Check
+
 Basic DMAAP Data Router Health Check
     [Tags]    health    datarouter   health-dmaap
     Run DR Health Check
index 6d929e5..df4b025 100644 (file)
@@ -4,7 +4,7 @@
 
 major=1
 minor=7
-patch=3
+patch=4
 
 base_version=${major}.${minor}.${patch}