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 |
| 5 | Library UUID |
| 6 | |
| 7 | Resource global_properties.robot |
| 8 | |
| 9 | *** Variables *** |
| 10 | ${MR_HEALTH_CHECK_PATH} /topics |
| 11 | |
| 12 | *** Keywords *** |
| 13 | Run MR Health Check |
| 14 | [Documentation] Runs MR Health check |
| 15 | ${resp}= Run MR Get Request ${MR_HEALTH_CHECK_PATH} |
| 16 | Should Be Equal As Strings ${resp.status_code} 200 |
| 17 | Should Contain ${resp.json()} topics |
| 18 | |
| 19 | Run MR Get Request |
| 20 | [Documentation] Runs MR Get request |
| 21 | [Arguments] ${data_path} |
| 22 | ${session}= Create Session mr ${GLOBAL_MR_SERVER} |
| 23 | ${uuid}= Generate UUID |
| 24 | ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} |
| 25 | ${resp}= Get Request mr ${data_path} headers=${headers} |
| 26 | Log Received response from message router ${resp.text} |
| 27 | [Return] ${resp} |
| 28 | |