summaryrefslogtreecommitdiffstats
path: root/robot/resources/music/music_interface.robot
blob: 67e1402b544eeafac72e50a29d045d043db23235 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
*** 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/v2/version
${MUSIC_CASSA_HEALTH_CHECK_PATH}        /MUSIC/rest/v2/service/musicHealthCheck
${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 Cassandra Connection Check
     [Documentation]    Confirm MUSIC's connection to Cassandra in active
     ${resp}=    Run MUSIC Get Request    ${MUSIC_CASSA_HEALTH_CHECK_PATH}    
     Should Be Equal As Strings   ${resp.status_code}   200
     Should Be Equal As Strings   ${resp.json()['Cassandra']}   Active