diff options
Diffstat (limited to 'csit/resources/tests/common-library.robot')
-rw-r--r-- | csit/resources/tests/common-library.robot | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/csit/resources/tests/common-library.robot b/csit/resources/tests/common-library.robot index fb6f52f0..c43b5dca 100644 --- a/csit/resources/tests/common-library.robot +++ b/csit/resources/tests/common-library.robot @@ -10,10 +10,6 @@ PolicyAdminAuth ${policyadmin}= Create list policyadmin zb!XztG34 [return] ${policyadmin} -HealthCheckAuth - ${healthcheck}= Create list policyadmin zb!XztG34 - [return] ${healthcheck} - PerformPostRequest [Arguments] ${domain} ${url} ${expectedstatus} ${postjson} ${params} ${auth} Log Creating session http://${domain} @@ -135,3 +131,20 @@ ValidateResponseTime ${rawNumber}= Evaluate ${resp['data']['result'][0]['value'][1]} ${actualTime}= Set Variable ${rawNumber * ${1000}} Should Be True ${actualTime} <= ${timeLimit} + +GetTopic + [Arguments] ${topic} + Create Session session http://${DMAAP_IP} max_retries=1 + ${params}= Create Dictionary limit 1 timeout 0 + ${resp}= GET On Session session /events/${topic}/script/1 ${params} + Status Should Be OK ${resp} + +CheckTopic + [Arguments] ${topic} ${expected_status} + Create Session session http://${DMAAP_IP} max_retries=1 + ${params}= Create Dictionary limit 1 + ${resp}= GET On Session session /events/${topic}/script/1 ${params} + Log Received response from dmaap ${resp.text} + Status Should Be OK ${resp} + Should Contain ${resp.text} ${expected_status} + [Return] ${resp.text} |