aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit
diff options
context:
space:
mode:
Diffstat (limited to 'test/csit')
-rwxr-xr-xtest/csit/plans/dmaap-datarouter/dr-suite/setup.sh1
-rwxr-xr-xtest/csit/tests/dmaap-datarouter/dr-suite/dr-suite.robot30
2 files changed, 22 insertions, 9 deletions
diff --git a/test/csit/plans/dmaap-datarouter/dr-suite/setup.sh b/test/csit/plans/dmaap-datarouter/dr-suite/setup.sh
index 31e4d1fae..c1bb75967 100755
--- a/test/csit/plans/dmaap-datarouter/dr-suite/setup.sh
+++ b/test/csit/plans/dmaap-datarouter/dr-suite/setup.sh
@@ -7,6 +7,7 @@ mkdir -p $WORKSPACE/archives/dmaapdr
cd $WORKSPACE/archives/dmaapdr
git clone --depth 1 https://gerrit.onap.org/r/dmaap/datarouter -b master
+cd datarouter
git pull
cd $WORKSPACE/archives/dmaapdr/datarouter/datarouter-prov/src/main/resources/docker-compose/
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}