blob: 717fc7c8cd8ed8307d24d47d1746e5a0ed23c03c [file] [log] [blame]
DR695Hccff30b2017-02-17 18:44:24 -05001*** Settings ***
2Documentation The main interface for interacting with Message router. It handles low level stuff like managing the http request library and message router required fields
3Library RequestsClientCert
4Library RequestsLibrary
5Library UUID
6
7Resource global_properties.robot
8
9*** Variables ***
10${MR_HEALTH_CHECK_PATH} /topics
DR695Hbf5a3a32017-06-30 13:09:57 -040011${MR_ENDPOINT} ${GLOBAL_MR_SERVER_PROTOCOL}://${GLOBAL_INJECTED_MR_IP_ADDR}:${GLOBAL_MR_SERVER_PROTOCOL}
12
DR695Hccff30b2017-02-17 18:44:24 -050013
14*** Keywords ***
15Run MR Health Check
16 [Documentation] Runs MR Health check
17 ${resp}= Run MR Get Request ${MR_HEALTH_CHECK_PATH}
18 Should Be Equal As Strings ${resp.status_code} 200
19 Should Contain ${resp.json()} topics
20
21Run MR Get Request
22 [Documentation] Runs MR Get request
23 [Arguments] ${data_path}
DR695Hbf5a3a32017-06-30 13:09:57 -040024 ${session}= Create Session mr ${MR_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -050025 ${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