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