blob: d1de683efbe37040e117f3bc72df625374bdbb8a [file] [log] [blame]
econwar92924972018-07-31 13:46:27 +00001*** Settings ***
2Library OperatingSystem
3Library RequestsLibrary
4Library requests
5Library Collections
6Library String
7
8*** Variables ***
9${TARGETURL_FEED} https://${DR_PROV_IP}:8443
10${CREATE_FEED_DATA} {"name": "CSIT_Test", "version": "m1.0", "description": "CSIT_Test", "business_description": "CSIT_Test", "suspend": false, "deleted": false, "changeowner": true, "authorization": {"classification": "unclassified", "endpoint_addrs": ["${DR_PROV_IP}"], "endpoint_ids": [{"password": "rs873m", "id": "rs873m"}]}}
11
12*** Test Cases ***
13Run Feed Creation
14 [Documentation] Feed Creation
15 [Timeout] 1 minute
16 ${resp}= PostFeed ${TARGETURL_FEED} ${CREATE_FEED_DATA}
17 log ${TARGETURL_FEED}
18 log ${resp.text}
19 Should Be Equal As Strings ${resp.status_code} 201
20 log 'JSON Response Code:'${resp}
21
22
23*** Keywords ***
24PostFeed
25 [Arguments] ${url} ${data}
26 ${headers}= Create Dictionary X-ATT-DR-ON-BEHALF-OF=rs873m Content-Type=application/vnd.att-dr.feed
27 ${resp}= Evaluate requests.post('${url}',data='${data}', headers=${headers},verify=False) requests
28 [Return] ${resp}