DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation The main interface for interacting with Message router. It handles low level stuff like managing the http request library and message router required fields |
| 3 | Library RequestsClientCert |
| 4 | Library RequestsLibrary |
Jerry Flood | 8fd592b | 2017-07-29 07:31:50 -0400 | [diff] [blame] | 5 | Library UUID |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 6 | |
| 7 | Resource global_properties.robot |
| 8 | |
| 9 | *** Variables *** |
| 10 | ${MR_HEALTH_CHECK_PATH} /topics |
Jerry Flood | 8fd592b | 2017-07-29 07:31:50 -0400 | [diff] [blame] | 11 | ${MR_ENDPOINT} ${GLOBAL_MR_SERVER_PROTOCOL}://${GLOBAL_INJECTED_MR_IP_ADDR}:${GLOBAL_MR_SERVER_PORT} |
DR695H | bf5a3a3 | 2017-06-30 13:09:57 -0400 | [diff] [blame] | 12 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 13 | |
| 14 | *** Keywords *** |
| 15 | Run MR Health Check |
| 16 | [Documentation] Runs MR Health check |
Jerry Flood | 8fd592b | 2017-07-29 07:31:50 -0400 | [diff] [blame] | 17 | ${resp}= Run MR Get Request ${MR_HEALTH_CHECK_PATH} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 18 | Should Be Equal As Strings ${resp.status_code} 200 |
| 19 | Should Contain ${resp.json()} topics |
Jerry Flood | 8fd592b | 2017-07-29 07:31:50 -0400 | [diff] [blame] | 20 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 21 | Run MR Get Request |
| 22 | [Documentation] Runs MR Get request |
| 23 | [Arguments] ${data_path} |
DR695H | bf5a3a3 | 2017-06-30 13:09:57 -0400 | [diff] [blame] | 24 | ${session}= Create Session mr ${MR_ENDPOINT} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 25 | ${uuid}= Generate UUID |
| 26 | ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} |
| 27 | ${resp}= Get Request mr ${data_path} headers=${headers} |
| 28 | Log Received response from message router ${resp.text} |
| 29 | [Return] ${resp} |
| 30 | |