blob: 1a858f249e4ce79b7db9456a40d26a59a9f8d04a [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
Jerry Flood8fd592b2017-07-29 07:31:50 -04005Library UUID
DR695Hccff30b2017-02-17 18:44:24 -05006
7Resource global_properties.robot
8
9*** Variables ***
10${MR_HEALTH_CHECK_PATH} /topics
Jerry Flood8fd592b2017-07-29 07:31:50 -040011${MR_ENDPOINT} ${GLOBAL_MR_SERVER_PROTOCOL}://${GLOBAL_INJECTED_MR_IP_ADDR}:${GLOBAL_MR_SERVER_PORT}
DR695Hbf5a3a32017-06-30 13:09:57 -040012
DR695Hccff30b2017-02-17 18:44:24 -050013
14*** Keywords ***
15Run MR Health Check
16 [Documentation] Runs MR Health check
Jerry Flood8fd592b2017-07-29 07:31:50 -040017 ${resp}= Run MR Get Request ${MR_HEALTH_CHECK_PATH}
DR695Hccff30b2017-02-17 18:44:24 -050018 Should Be Equal As Strings ${resp.status_code} 200
19 Should Contain ${resp.json()} topics
Jerry Flood8fd592b2017-07-29 07:31:50 -040020
DR695Hccff30b2017-02-17 18:44:24 -050021Run 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