dd2cabebae0a8e19cb5b7912d58cebd2510410d5
[testsuite.git] / robot / resources / sms_interface.robot
1 *** Settings ***
2 Documentation     The main interface for interacting with SMS.
3 Library           RequestsClientCert
4 Library               RequestsLibrary
5 Library           UUID
6
7 Resource          global_properties.robot
8
9 *** Variables ***
10 ${SMS_HEALTH_CHECK_PATH}        /v1/sms/healthcheck
11 ${SMS_ENDPOINT}     ${GLOBAL_SMS_SERVER_PROTOCOL}://${GLOBAL_SMS_SERVER_NAME}:${GLOBAL_SMS_SERVER_PORT}
12
13 *** Keywords ***
14 Run SMS Health Check
15      [Documentation]    Runs SMS Health check
16      ${resp}=    Run SMS Get Request    ${SMS_HEALTH_CHECK_PATH}
17      Should Be Equal As Strings         ${resp.status_code}     200
18
19 Run SMS Get Request
20      [Documentation]    Runs SMS Get request
21      [Arguments]    ${data_path}
22      ${session}=    Create Session  smssession  ${SMS_ENDPOINT}
23      ${resp}=   Get Request     smssession      ${data_path}
24      Should Be Equal As Integers        ${resp.status_code}     200
25      Log    Received response from SMS ${resp.text}
26      [Return]    ${resp}