Add topic validation for dcaegen2 VES tests
Issue-ID: DCAEGEN2-1771
Signed-off-by: Bartosz Gardziejewski <bartosz.gardziejewski@nokia.com>
Change-Id: Ifb4f0f01ef3dcda366147d32c98a9be7890b6f56
diff --git a/tests/dcaegen2/testcases/resources/DcaeLibrary.py b/tests/dcaegen2/testcases/resources/DcaeLibrary.py
index 6b96826..a9d5def 100644
--- a/tests/dcaegen2/testcases/resources/DcaeLibrary.py
+++ b/tests/dcaegen2/testcases/resources/DcaeLibrary.py
@@ -88,6 +88,18 @@
return
@staticmethod
+ def dmaap_message_receive_on_topic(evtobj, topic):
+
+ evt_str = DMaaP.deque_event()
+ while evt_str != None:
+ if evtobj in evt_str and topic in evt_str:
+ logger.info("DMaaP Receive Expected Publish Event:\n" + evt_str)
+ logger.info("On Expected Topic:\n" + topic)
+ return 'true'
+ evt_str = DMaaP.deque_event()
+ return 'false'
+
+ @staticmethod
def dmaap_message_receive(evtobj, action='contain'):
evt_str = DMaaP.deque_event()