From 18088d8304026be6d7720f37d1aaea6d9b5dcede Mon Sep 17 00:00:00 2001 From: econwar Date: Thu, 9 Aug 2018 14:21:29 +0000 Subject: Add Publish to Feed Test Case Change-Id: I5926771744ce870690388c9dcaf7bbbd1f21862d Signed-off-by: Conor Ward Issue-ID: DMAAP-564 --- test/csit/tests/dmaap-datarouter/dr-suite/dr-suite.robot | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'test/csit/tests') 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 b5092f86a..12d587504 100755 --- a/test/csit/tests/dmaap-datarouter/dr-suite/dr-suite.robot +++ b/test/csit/tests/dmaap-datarouter/dr-suite/dr-suite.robot @@ -10,12 +10,14 @@ ${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 ${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"}]}} ${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": ["${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"} ${UPDATE_SUBSCRIPTION_DATA} {"delivery":{ "url":"https://${DR_PROV_IP}:8080/", "user":"sg481n", "password":"sg481n", "use100":true}, "metadataOnly":false, "suspend":true, "groupid":29, "subscriber":"sg481n"} ${FEED_CONTENT_TYPE} application/vnd.att-dr.feed ${SUBSCRIBE_CONTENT_TYPE} application/vnd.att-dr.subscription +${PUBLISH_FEED_CONTENT_TYPE} application/octet-stream *** Test Cases *** Run Feed Creation @@ -36,6 +38,16 @@ Run Subscribe to Feed Should Be Equal As Strings ${resp.status_code} 201 log 'JSON Response Code:'${resp} +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} + Should Be Equal As Strings ${resp.status_code} 204 + log 'JSON Response Code:'${resp} + Run Update Subscription [Documentation] Update Subscription to suspend and change delivery credentials [Timeout] 1 minute @@ -87,7 +99,7 @@ PostCall PutCall [Arguments] ${url} ${data} ${content_type} ${user} - ${headers}= Create Dictionary X-ATT-DR-ON-BEHALF-OF=${user} Content-Type=${content_type} + ${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 [Return] ${resp} -- cgit 1.2.3-korg