diff options
author | Filip Krzywka <filip.krzywka@nokia.com> | 2018-08-06 10:44:47 +0200 |
---|---|---|
committer | Filip Krzywka <filip.krzywka@nokia.com> | 2018-08-31 07:47:38 +0200 |
commit | 81f5d528e1acd40b7a0987df907bd85d4ffa3414 (patch) | |
tree | ea470a91da3c7219d9d1b599f38ad5d1b517ea32 /test/csit/tests/dcaegen2-collectors-hv-ves/testcases/libraries | |
parent | e26347542c3e379dba7aaf840c35140e6d097d4c (diff) |
Add messages validation in DCAE app simulator
This enhances assertions and makes sure that HV-VES does not mess
with measurements sent through GPB payload
Change-Id: I140e6c35abc72270e2af8c5b1749136e6732e02a
Issue-ID: DCAEGEN2-687
Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
Diffstat (limited to 'test/csit/tests/dcaegen2-collectors-hv-ves/testcases/libraries')
-rw-r--r-- | test/csit/tests/dcaegen2-collectors-hv-ves/testcases/libraries/DcaeAppSimulatorLibrary.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/libraries/DcaeAppSimulatorLibrary.py b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/libraries/DcaeAppSimulatorLibrary.py index 29e5b5721..80a5c41cf 100644 --- a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/libraries/DcaeAppSimulatorLibrary.py +++ b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/libraries/DcaeAppSimulatorLibrary.py @@ -24,3 +24,13 @@ class DcaeAppSimulatorLibrary: resp = HttpRequests.session_without_env().delete(app_url, timeout=5) HttpRequests.checkStatusCode(resp.status_code, DCAE_APP_NAME) + def assert_DCAE_app_consumed_proper_messages(self, app_url, message_filepath): + logger.info("POST at: " + app_url) + file = open(message_filepath, "rb") + data = file.read() + file.close() + + resp = HttpRequests.session_without_env().post(app_url, data=data, timeout=5) + HttpRequests.checkStatusCode(resp.status_code, DCAE_APP_NAME) + + |