From 4ec946e366474f02edb3518db6022852a452bac0 Mon Sep 17 00:00:00 2001 From: EmmettCox Date: Tue, 26 Feb 2019 13:45:00 +0000 Subject: [PATCH] Adding CSIT test to query dr logs with filename Change-Id: Ideedd123d46b706e03fd8ba2218178d8295734d5 Issue-ID: DMAAP-1034 Signed-off-by: EmmettCox --- tests/dmaap-datarouter/dr-suite/dr-suite.robot | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/dmaap-datarouter/dr-suite/dr-suite.robot b/tests/dmaap-datarouter/dr-suite/dr-suite.robot index fb70326e..c4379153 100755 --- a/tests/dmaap-datarouter/dr-suite/dr-suite.robot +++ b/tests/dmaap-datarouter/dr-suite/dr-suite.robot @@ -9,6 +9,8 @@ Library String *** Variables *** ${TARGET_URL} https://${DR_PROV_IP}:8443 ${TARGET_URL_FEED} https://${DR_PROV_IP}:8443/feed/1 +${TARGET_URL_EXISTS_LOGGING} https://${DR_PROV_IP}:8443/feedlog/1?type=pub&filename=csit_test +${TARGET_URL_NOT_EXISTS_LOGGING} https://${DR_PROV_IP}:8443/feedlog/1?type=pub&filename=file_that_doesnt_exist ${TARGET_URL_SUBSCRIBE} https://${DR_PROV_IP}:8443/subscribe/1 ${TARGET_URL_SUBSCRIPTION} https://${DR_PROV_IP}:8443/subs/1 ${TARGET_URL_PUBLISH_PROV} https://${DR_PROV_IP}:8443/publish/1/csit_test @@ -117,6 +119,24 @@ Run Update Feed Should Contain ${resp.text} "UPDATED-CSIT_Test" log 'JSON Response Code:'${resp} +Run Get With Filename That Exists + [Documentation] Get publish record with a specified filename + [Timeout] 2 minutes + sleep 1 minute 45 seconds needed to ensure logs have been updated + ${resp}= GetCall ${TARGET_URL_EXISTS_LOGGING} ${FEED_CONTENT_TYPE} rs873m + log ${resp.text} + Should Contain ${resp.text} "fileName":"csit_test" + log 'JSON Response Code:'${resp} + +Run Get With Filename That Doesnt Exist + [Documentation] Get publish record with a specified filename + [Timeout] 1 minute + ${resp}= GetCall ${TARGET_URL_NOT_EXISTS_LOGGING} ${FEED_CONTENT_TYPE} rs873m + log ${resp.text} + Should Contain ${resp.text} [] + log 'JSON Response Code:'${resp} + + Run Delete Subscription [Documentation] Delete Subscription [Timeout] 1 minute -- 2.16.6