adding in music healthcheck 77/42377/2
authorDR695H <dr695h@att.com>
Thu, 12 Apr 2018 02:28:41 +0000 (22:28 -0400)
committerDR695H <dr695h@att.com>
Thu, 12 Apr 2018 22:24:35 +0000 (18:24 -0400)
music is new ha database and needs a healthcheck

Change-Id: I76d7e31c85c5be6fb2fa4439bcc62184a70fb8f4
Issue-ID: TEST-87
Signed-off-by: DR695H <dr695h@att.com>
robot/resources/aaf_interface.robot
robot/resources/music/music_interface.robot [new file with mode: 0644]
robot/resources/test_templates/closedloop_test_template.robot
robot/testsuites/health-check.robot

index c924591..c6a5e6f 100644 (file)
@@ -26,5 +26,4 @@ Run AAF Get Request
      ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json    X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid}    X-FromAppId=${GLOBAL_APPLICATION_ID}
      ${resp}=  Get Request     aaf     ${data_path}     headers=${headers}
      Log    Received response from aaf ${resp.text}
-     [Return]    ${resp}
-
+     [Return]    ${resp}
\ No newline at end of file
diff --git a/robot/resources/music/music_interface.robot b/robot/resources/music/music_interface.robot
new file mode 100644 (file)
index 0000000..cde2d3d
--- /dev/null
@@ -0,0 +1,28 @@
+*** Settings ***
+Documentation    The main interface for interacting with MUSIC. It handles low level stuff like managing the http request library and MUSIC required fields
+Library                  RequestsClientCert
+Library              RequestsLibrary
+Library                  UUID      
+
+Resource          ../global_properties.robot
+
+*** Variables ***
+${MUSIC_HEALTH_CHECK_PATH}        /MUSIC/rest/version
+${MUSIC_ENDPOINT}     ${GLOBAL_MUSIC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_MUSIC_IP_ADDR}:${GLOBAL_MUSIC_SERVER_PORT}
+
+*** Keywords ***
+Run MUSIC Health Check
+     [Documentation]    Runs MUSIC Health check
+     ${resp}=    Run MUSIC Get Request    ${MUSIC_HEALTH_CHECK_PATH}    
+     Should Be Equal As Strings        ${resp.status_code}     200
+     Should Be Equal As Strings        ${resp.json()['status']}        SUCCESS
+         
+Run MUSIC Get Request
+     [Documentation]    Runs MUSIC Get request
+     [Arguments]    ${data_path}
+     ${session}=    Create Session     music   ${MUSIC_ENDPOINT}
+     ${uuid}=    Generate UUID
+     ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json    X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid}    X-FromAppId=${GLOBAL_APPLICATION_ID}
+     ${resp}=  Get Request     music   ${data_path}     headers=${headers}
+     Log    Received response from music ${resp.text}
+     [Return]    ${resp}
\ No newline at end of file
index 9ae2ee9..0a0a895 100644 (file)
@@ -115,7 +115,7 @@ Get Configs VDNS Policy
     Should Be Equal    ${severity}    ${Expected_Severity_2}
     ${Thresold_Value}=    Get Variable Value      ${config["content"]["tca_policy"]["metricsPerEventName"][0]["thresholds"][0]["thresholdValue"]}
     Should Be Equal As Integers   ${Thresold_Value}    ${Expected_Threshold_1}
-${direction}=    Get Variable Value      ${config["content"]["tca_policy"]["metricsPerEventName"][0]["thresholds"][0]["direction"]}
+    ${direction}=    Get Variable Value      ${config["content"]["tca_policy"]["metricsPerEventName"][0]["thresholds"][0]["direction"]}
     Should Be Equal   ${direction}    ${Expected_Direction_3}
 
 Teardown Closed Loop
index b2953d1..2091b59 100644 (file)
@@ -17,6 +17,7 @@ Resource          ../resources/mr_interface.robot
 Resource          ../resources/aaf_interface.robot
 Resource          ../resources/msb_interface.robot
 Resource          ../resources/clamp_interface.robot
+Resource          ../resources/music/music_interface.robot
 Resource          ../resources/test_templates/model_test_template.robot
 
 
@@ -61,6 +62,10 @@ Basic Multicloud-vio API Health Check
      [Tags]    health    multicloud
      Run MSB Get Request  /api/multicloud-vio/v0/swagger.json
 
+Basic MUSIC Health Check
+     [Tags]    health    core
+     Run MUSIC Health Check
+
 Basic Policy Health Check
     [Tags]    health    core
     Run Policy Health Check