aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2018-10-01 15:14:11 +0000
committerGerrit Code Review <gerrit@onap.org>2018-10-01 15:14:11 +0000
commit1130f9cfc5842722a523d64ed0b391eb7ad1624d (patch)
tree4e2a5b727f8f549eba96a8ed523190f8a0b68642
parent7729ada64fae14e43d0a7de417d52bdb920ae4d4 (diff)
parentfdcd89c0e9f5b967530b88ebd163c4e779f37347 (diff)
Merge "Publish to Prov in CSIT"
-rwxr-xr-xplans/dmaap-datarouter/dr-suite/setup.sh1
-rwxr-xr-xtests/dmaap-datarouter/dr-suite/dr-suite.robot18
2 files changed, 10 insertions, 9 deletions
diff --git a/plans/dmaap-datarouter/dr-suite/setup.sh b/plans/dmaap-datarouter/dr-suite/setup.sh
index e5debfc2..023e2658 100755
--- a/plans/dmaap-datarouter/dr-suite/setup.sh
+++ b/plans/dmaap-datarouter/dr-suite/setup.sh
@@ -38,7 +38,6 @@ echo DR_PROV_IP=${DR_PROV_IP}
echo DR_NODE_IP=${DR_NODE_IP}
echo DR_GATEWAY_IP=${DR_GATEWAY_IP}
-docker exec -i datarouter-prov sh -c "curl -k -X PUT https://$DR_PROV_IP:8443/internal/api/NODES?val=dmaap-dr-node\|$DR_GATEWAY_IP"
docker exec -i datarouter-prov sh -c "curl -k -X PUT https://$DR_PROV_IP:8443/internal/api/PROV_AUTH_ADDRESSES?val=dmaap-dr-prov\|$DR_GATEWAY_IP"
#Pass any variables required by Robot test suites in ROBOT_VARIABLES
diff --git a/tests/dmaap-datarouter/dr-suite/dr-suite.robot b/tests/dmaap-datarouter/dr-suite/dr-suite.robot
index fcac2026..d00bddc7 100755
--- a/tests/dmaap-datarouter/dr-suite/dr-suite.robot
+++ b/tests/dmaap-datarouter/dr-suite/dr-suite.robot
@@ -10,7 +10,8 @@ ${TARGET_URL} https://${DR_PROV_IP}:8443
${TARGET_URL_FEED} https://${DR_PROV_IP}:8443/feed/1
${TARGET_URL_SUBSCRIBE} https://${DR_PROV_IP}:8443/subscribe/1
${TARGET_URL_SUBSCRIPTION} https://${DR_PROV_IP}:8443/subs/1
-${TARGET_URL_PUBLISH} https://${DR_NODE_IP}:8443/publish/1/csit_test
+${TARGET_URL_PUBLISH_PROV} https://${DR_PROV_IP}:8443/publish/1/csit_test
+${TARGET_URL_PUBLISH_NODE} https://${DR_NODE_IP}:8443/publish/1/csit_test
${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": [], "endpoint_ids": [{"password": "rs873m", "id": "rs873m"}]}}
${UPDATE_FEED_DATA} {"name": "CSIT_Test", "version": "m1.0", "description": "UPDATED-CSIT_Test", "business_description": "CSIT_Test", "suspend": true, "deleted": false, "changeowner": true, "authorization": {"classification": "unclassified", "endpoint_addrs": [], "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"}
@@ -42,9 +43,10 @@ Run Publish Feed
[Documentation] Publish to Feed
[Timeout] 1 minute
Sleep 10s Behaviour was noticed where feed was not created in time for publish to be sent
- ${resp}= PutCall ${TARGET_URL_PUBLISH} ${CREATE_FEED_DATA} ${PUBLISH_FEED_CONTENT_TYPE} rs873m
- log ${TARGET_URL_PUBLISH}
- log ${resp.text}
+ ${resp}= PutCall ${TARGET_URL_PUBLISH_PROV} ${CREATE_FEED_DATA} ${PUBLISH_FEED_CONTENT_TYPE} rs873m
+ log ${TARGET_URL_PUBLISH_PROV}
+ Should Contain ${resp.headers['Location']} https://dmaap-dr-node:8443/publish/1/csit_test
+ ${resp}= PutCall ${TARGET_URL_PUBLISH_NODE} ${CREATE_FEED_DATA} ${PUBLISH_FEED_CONTENT_TYPE} rs873m
Should Be Equal As Strings ${resp.status_code} 204
log 'JSON Response Code:'${resp}
@@ -94,23 +96,23 @@ Run Delete Feed
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
+ ${resp}= Evaluate requests.post('${url}', data='${data}', headers=${headers}, verify=False) requests
[Return] ${resp}
PutCall
[Arguments] ${url} ${data} ${content_type} ${user}
${headers}= Create Dictionary X-ATT-DR-ON-BEHALF-OF=${user} Content-Type=${content_type} Authorization=Basic cnM4NzNtOnJzODczbQ==
- ${resp}= Evaluate requests.put('${url}',data='${data}', headers=${headers},verify=False) requests
+ ${resp}= Evaluate requests.put('${url}', data='${data}', headers=${headers}, verify=False, allow_redirects=False) requests
[Return] ${resp}
GetCall
[Arguments] ${url} ${content_type} ${user}
${headers}= Create Dictionary X-ATT-DR-ON-BEHALF-OF=${user} Content-Type=${content_type}
- ${resp}= Evaluate requests.get('${url}', headers=${headers},verify=False) requests
+ ${resp}= Evaluate requests.get('${url}', headers=${headers}, verify=False) requests
[Return] ${resp}
DeleteCall
[Arguments] ${url} ${user}
${headers}= Create Dictionary X-ATT-DR-ON-BEHALF-OF=${user}
- ${resp}= Evaluate requests.delete('${url}', headers=${headers},verify=False) requests
+ ${resp}= Evaluate requests.delete('${url}', headers=${headers}, verify=False) requests
[Return] ${resp}