aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/tests/dmaap-datarouter/dr-suite/dr-suite.robot
diff options
context:
space:
mode:
Diffstat (limited to 'test/csit/tests/dmaap-datarouter/dr-suite/dr-suite.robot')
-rwxr-xr-xtest/csit/tests/dmaap-datarouter/dr-suite/dr-suite.robot30
1 files changed, 21 insertions, 9 deletions
diff --git a/test/csit/tests/dmaap-datarouter/dr-suite/dr-suite.robot b/test/csit/tests/dmaap-datarouter/dr-suite/dr-suite.robot
index d1de683ef..527a9e2bd 100755
--- a/test/csit/tests/dmaap-datarouter/dr-suite/dr-suite.robot
+++ b/test/csit/tests/dmaap-datarouter/dr-suite/dr-suite.robot
@@ -6,23 +6,35 @@ Library Collections
Library String
*** Variables ***
-${TARGETURL_FEED} https://${DR_PROV_IP}:8443
-${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"}]}}
+${TARGET_URL_FEED} https://${DR_PROV_IP}:8443
+${TARGET_URL_SUBSCRIBE} https://${DR_PROV_IP}:8443/subscribe/1
+${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"}]}}
+${SUBSCRIBE_DATA} {"delivery":{ "url":"https://${DR_PROV_IP}:8080/", "user":"rs873m", "password":"rs873m", "use100":true}, "metadataOnly":false, "suspend":false, "groupid":29, "subscriber":"sg481n"}
+${FEED_CONTENT_TYPE} application/vnd.att-dr.feed
+${SUBSCRIBE_CONTENT_TYPE} application/vnd.att-dr.subscription
*** Test Cases ***
Run Feed Creation
[Documentation] Feed Creation
[Timeout] 1 minute
- ${resp}= PostFeed ${TARGETURL_FEED} ${CREATE_FEED_DATA}
- log ${TARGETURL_FEED}
+ ${resp}= PostCall ${TARGET_URL_FEED} ${CREATE_FEED_DATA} ${FEED_CONTENT_TYPE} rs873m
+ log ${TARGET_URL_FEED}
log ${resp.text}
Should Be Equal As Strings ${resp.status_code} 201
log 'JSON Response Code:'${resp}
+Run Subscribe to Feed
+ [Documentation] Subscribe to Feed
+ [Timeout] 1 minute
+ ${resp}= PostCall ${TARGET_URL_SUBSCRIBE} ${SUBSCRIBE_DATA} ${SUBSCRIBE_CONTENT_TYPE} sg481n
+ log ${TARGET_URL_SUBSCRIBE}
+ log ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 201
+ log 'JSON Response Code:'${resp}
*** Keywords ***
-PostFeed
- [Arguments] ${url} ${data}
- ${headers}= Create Dictionary X-ATT-DR-ON-BEHALF-OF=rs873m Content-Type=application/vnd.att-dr.feed
- ${resp}= Evaluate requests.post('${url}',data='${data}', headers=${headers},verify=False) requests
- [Return] ${resp}
+PostCall
+ [Arguments] ${url} ${data} ${content_type} ${user}
+ ${headers}= Create Dictionary X-ATT-DR-ON-BEHALF-OF=${user} Content-Type=${content_type}
+ ${resp}= Evaluate requests.post('${url}',data='${data}', headers=${headers},verify=False) requests
+ [Return] ${resp}