summaryrefslogtreecommitdiffstats
path: root/robot/resources/cli_interface.robot
blob: 01178f0d3fe79ba216ca9d142f74818d0bba4be7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
*** Settings ***
Documentation      The main interface for interacting with CLI.
Library           RequestsLibrary

Resource          global_properties.robot

*** Variables ***
${CLI_HEALTH_CHECK_PATH}        /
${CLI_ENDPOINT}     ${GLOBAL_CLI_SERVER_PROTOCOL}://${GLOBAL_INJECTED_CLI_IP_ADDR}:${GLOBAL_CLI_SERVER_PORT}

*** Keywords ***
Run CLI Health Check
     [Documentation]    Runs CLI Health check
     ${resp}=    Run CLI Get Request    ${CLI_HEALTH_CHECK_PATH}
     Should Be Equal As Strings     ${resp.status_code}     200

Run CLI Get Request
     [Documentation]    Runs CLI Get request
     [Arguments]    ${data_path}
     ${session}=    Create Session    cli    ${CLI_ENDPOINT}
     ${resp}=     Get Request     cli     ${data_path}
     Log    Received response from CLI ${resp.text}
     [Return]    ${resp}