diff options
author | econwar <conor.ward@ericsson.com> | 2018-08-08 14:05:22 +0000 |
---|---|---|
committer | econwar <conor.ward@ericsson.com> | 2018-08-08 14:05:22 +0000 |
commit | d53404812faa6482bbfd2f4d177791fbd6c907a4 (patch) | |
tree | 1332d5b879983ce7f4f14acc75586a97fd140397 /test/csit/tests/dmaap-datarouter | |
parent | 7e9188b57abc8588e51e8b86204aa718640170cc (diff) |
Add Subscribe to Feed Test Case
Change-Id: Icf0139e9850b4efcac89e7ff4c3cce55cee71d73
Issue-ID: DMAAP-66
Signed-off-by: Conor Ward <conor.ward@ericsson.com>
Diffstat (limited to 'test/csit/tests/dmaap-datarouter')
-rwxr-xr-x | test/csit/tests/dmaap-datarouter/dr-suite/dr-suite.robot | 30 |
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} |