aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/tests/so/sanity-check/sanity_test_so.robot
blob: e53b46c4cb270b3e19b7bdf20d37f9e28f6c96c3 (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
25
*** settings ***
Resource    ../../common.robot
Library     Collections
Library     RequestsLibrary
Library     OperatingSystem
Library     json
Library     HttpLibrary.HTTP

*** Variables ***
@{return_ok_list}=   200  201  202
${queryservice_url}       /api/so/v1/services/5212b49f-fe70-414f-9519-88bec35b3190
${service_id}
${operation_id}
*** Test Cases ***
soQueryServiceFuncTest
    [Documentation]    query single service rest test
    ${headers}    Create Dictionary    Content-Type=application/json    Accept=application/json
    Create Session    web_session    http://${MSB_IP}    headers=${headers}
    ${resp}=  Get Request    web_session    ${queryservice_url}
    ${responese_code}=     Convert To String      ${resp.status_code}
    List Should Contain Value    ${return_ok_list}   ${responese_code}
    ${response_json}    json.loads    ${resp.content}
    ${serviceName}=    Convert To String      ${response_json['serviceName']}
    Should Be Equal    ${serviceName}    test_so