DR695H | ce07d41 | 2018-04-11 22:28:41 -0400 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation The main interface for interacting with MUSIC. It handles low level stuff like managing the http request library and MUSIC required fields |
| 3 | Library RequestsClientCert |
| 4 | Library RequestsLibrary |
| 5 | Library UUID |
| 6 | |
| 7 | Resource ../global_properties.robot |
| 8 | |
| 9 | *** Variables *** |
Brian Freeman | a5fe4cc | 2018-04-17 08:00:37 -0500 | [diff] [blame] | 10 | ${MUSIC_HEALTH_CHECK_PATH} /MUSIC/rest/v2/version |
DR695H | ce07d41 | 2018-04-11 22:28:41 -0400 | [diff] [blame] | 11 | ${MUSIC_ENDPOINT} ${GLOBAL_MUSIC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_MUSIC_IP_ADDR}:${GLOBAL_MUSIC_SERVER_PORT} |
| 12 | |
| 13 | *** Keywords *** |
| 14 | Run MUSIC Health Check |
| 15 | [Documentation] Runs MUSIC Health check |
| 16 | ${resp}= Run MUSIC Get Request ${MUSIC_HEALTH_CHECK_PATH} |
| 17 | Should Be Equal As Strings ${resp.status_code} 200 |
| 18 | Should Be Equal As Strings ${resp.json()['status']} SUCCESS |
| 19 | |
| 20 | Run MUSIC Get Request |
| 21 | [Documentation] Runs MUSIC Get request |
| 22 | [Arguments] ${data_path} |
| 23 | ${session}= Create Session music ${MUSIC_ENDPOINT} |
| 24 | ${uuid}= Generate UUID |
| 25 | ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} |
| 26 | ${resp}= Get Request music ${data_path} headers=${headers} |
| 27 | Log Received response from music ${resp.text} |
Brian Freeman | a5fe4cc | 2018-04-17 08:00:37 -0500 | [diff] [blame] | 28 | [Return] ${resp} |