From a926d94469780de763da510c9cc01b768df2e444 Mon Sep 17 00:00:00 2001 From: Bartosz Gardziejewski Date: Wed, 29 Jul 2020 11:13:36 +0200 Subject: Add topic validation for dcaegen2 VES tests Issue-ID: DCAEGEN2-1771 Signed-off-by: Bartosz Gardziejewski Change-Id: Ifb4f0f01ef3dcda366147d32c98a9be7890b6f56 --- tests/dcaegen2/testcases/resources/dcae_keywords.robot | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tests/dcaegen2/testcases/resources/dcae_keywords.robot') diff --git a/tests/dcaegen2/testcases/resources/dcae_keywords.robot b/tests/dcaegen2/testcases/resources/dcae_keywords.robot index 0735ce8e..059372fb 100644 --- a/tests/dcaegen2/testcases/resources/dcae_keywords.robot +++ b/tests/dcaegen2/testcases/resources/dcae_keywords.robot @@ -141,19 +141,20 @@ Publish Event To VES Collector With Put Method Send Request And Validate Response [Documentation] Post singel event to passed url with passed data and validate received response - [Arguments] ${keyword} ${session} ${evtpath} ${evtjson} ${resp_code} ${msg_code}=None + [Arguments] ${keyword} ${session} ${evtpath} ${evtjson} ${resp_code} ${msg_code}=None ${topic}=None ${evtdata}= Get Data From File ${evtjson} ${resp}= Run Keyword ${keyword} ${session} ${evtpath} ${evtdata} Log Receive HTTPS Status code ${resp.status_code} Should Be Equal As Strings ${resp.status_code} ${resp_code} ${isEmpty}= Is Json Empty ${resp} Run Keyword If '${isEmpty}' == False Log ${resp.json()} - Run Keyword If '${msg_code}' != 'None' Check Whether Message Received ${msg_code} + Run Keyword If '${msg_code}' != 'None' Check Whether Message Received ${msg_code} ${topic} Check Whether Message Received [Documentation] Validare if message has been received - [Arguments] ${msg_code} - ${ret}= DMaaP Message Receive ${msg_code} + [Arguments] ${msg_code} ${topic} + ${ret}= Run Keyword If '${topic}' != 'None' DMaaP Message Receive On Topic ${msg_code} ${topic} + ... ELSE DMaaP Message Receive ${msg_code} Should Be Equal As Strings ${ret} true Send Request And Expect Error -- cgit 1.2.3-korg