summaryrefslogtreecommitdiffstats
path: root/robot/resources/music
diff options
context:
space:
mode:
authorDR695H <dr695h@att.com>2018-04-11 22:28:41 -0400
committerDR695H <dr695h@att.com>2018-04-12 18:24:35 -0400
commitce07d413432206b550c7df2df30f5b3d57ac2c7a (patch)
treea48ff3db5748db804a2ceb9d871790cb1701f6f7 /robot/resources/music
parentb9d6fbfbeed81129f5c92322eecd74fb2211f0bd (diff)
adding in music healthcheck
music is new ha database and needs a healthcheck Change-Id: I76d7e31c85c5be6fb2fa4439bcc62184a70fb8f4 Issue-ID: TEST-87 Signed-off-by: DR695H <dr695h@att.com>
Diffstat (limited to 'robot/resources/music')
-rw-r--r--robot/resources/music/music_interface.robot28
1 files changed, 28 insertions, 0 deletions
diff --git a/robot/resources/music/music_interface.robot b/robot/resources/music/music_interface.robot
new file mode 100644
index 00000000..cde2d3db
--- /dev/null
+++ b/robot/resources/music/music_interface.robot
@@ -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