Update Robot Framework format - step 4
[integration/test.git] / csit / suites / centinel / basic / 070_Subscribe.robot
1 *** Settings ***
2 Library             RequestsLibrary
3 Library             Collections
4 Library             json
5 Library             String
6 Library             OperatingSystem
7 Variables           ../../../variables/Variables.py
8
9 Suite Setup         Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
10 Suite Teardown      Delete All Sessions
11
12
13 *** Variables ***
14 ${SET_SUBSCRIBEUSER_JSON}       ${CURDIR}/../../../variables/centinel/set_subscribeUser.json
15
16
17 *** Test Cases ***
18 Set SubscribeUser
19     ${body}    OperatingSystem.Get File    ${SET_SUBSCRIBEUSER_JSON}
20     ${resp}    RequestsLibrary.Post Request    session    ${SET_SUBSCRIBEUSER}    ${body}
21     Should Be Equal As Strings    ${resp.status_code}    200
22
23 Get Subscription
24     ${resp}    RequestsLibrary.Get Request    session    ${SUBSCRIPTION}
25     Should Be Equal As Strings    ${resp.status_code}    200
26
27 Delete Subscription
28     ${delresp}    RequestsLibrary.Delete Request    session    ${SUBSCRIPTION}
29     Should Be Equal As Strings    ${delresp.status_code}    200