From: Michal Banka Date: Mon, 19 Apr 2021 11:29:47 +0000 (+0200) Subject: Add stndDefined routing tests X-Git-Url: https://gerrit.onap.org/r/gitweb?p=integration%2Fcsit.git;a=commitdiff_plain;h=2a825ed74e6262d775a2a293ac9af66c986d30e7 Add stndDefined routing tests Change-Id: Iecadf72382dd01135570dde62ae313f8f31808ed Signed-off-by: Michal Banka Issue-ID: DCAEGEN2-2702 --- diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot b/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot index 92b65cd6..df47b861 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot +++ b/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot @@ -1,7 +1,7 @@ # ============LICENSE_START======================================================= # csit-dcaegen2-collectors-hv-ves # ================================================================================ -# Copyright (C) 2018-2019 NOKIA +# Copyright (C) 2018-2021 NOKIA # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -39,9 +39,11 @@ Configure collector Configure Dcae App Wait until keyword succeeds 10 sec 5 sec - ... Configure Dcae App Simulator To Consume Messages From Topics ${DEFAULT_PERF3GPP_TOPIC},${SECOND_PERF3GPP_TOPIC} + ... Configure Dcae App Simulator To Consume Messages From Topics + ... ${DEFAULT_PERF3GPP_TOPIC},${SECOND_PERF3GPP_TOPIC},${DEFAULT_STNDDEFINED_3GPP_HEARTBEAT_TOPIC} Set Suite Variable ${DEFAULT_PERF3GPP_TOPIC} children=True Set Suite Variable ${SECOND_PERF3GPP_TOPIC} children=True + Set Suite Variable ${DEFAULT_STNDDEFINED_3GPP_HEARTBEAT_TOPIC} children=True *** Variables *** @@ -53,6 +55,7 @@ ${CONSUL_HV_VES_CONFIGURATION_KEY_PATH} /v1/kv/dcae-hv-ves-collector ${DEFAULT_PERF3GPP_TOPIC} TEST_HV_VES_PERF3GPP ${SECOND_PERF3GPP_TOPIC} TEST_HV_VES_PERF3GPP_BUT_WITH_EXTRA_WORDS +${DEFAULT_STNDDEFINED_3GPP_HEARTBEAT_TOPIC} TEST_SEC_3GPP_HEARTBEAT_OUTPUT ${HV_VES_RESOURCES} %{WORKSPACE}/tests/dcaegen2-collectors-hv-ves/testcases/resources ${HV_VES_CONFIGURATION_JSON_FILEPATH} ${HV_VES_RESOURCES}/hv-ves-configuration.json diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/message-routing.robot b/tests/dcaegen2-collectors-hv-ves/testcases/message-routing.robot index 9898a968..c0566049 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/message-routing.robot +++ b/tests/dcaegen2-collectors-hv-ves/testcases/message-routing.robot @@ -1,7 +1,7 @@ # ============LICENSE_START======================================================= # csit-dcaegen2-collectors-hv-ves # ================================================================================ -# Copyright (C) 2018-2019 NOKIA +# Copyright (C) 2018-2021 NOKIA # Modification copyright (C) 2021 Samsung Electronics Co., Ltd. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); @@ -46,6 +46,15 @@ Correct Messages Routing ... Assert Dcae App Consumed ${DEFAULT_PERF3GPP_TOPIC} ${AMOUNT_25000} Assert Dcae App Consumed Proper Messages ${DEFAULT_PERF3GPP_TOPIC} ${DCAE_FIXED_PAYLOAD_REQUEST} +Correct StndDefined Messages Routing + [Documentation] VES-HV Collector should route all valid messages to stndDefined topics specified in configuration + ... without changing message payload generated in xNF simulator + + Send Messages From xNF Simulators ${XNF_SIMULATOR} ${XNF_STNDDEFINED_PAYLOAD_REQUEST} + + Wait until keyword succeeds 60 sec 5 sec + ... Assert Dcae App Consumed ${DEFAULT_STNDDEFINED_3GPP_HEARTBEAT_TOPIC} ${AMOUNT_25000} + Assert Dcae App Consumed Proper Messages ${DEFAULT_STNDDEFINED_3GPP_HEARTBEAT_TOPIC} ${DCAE_STNDDEFINED_PAYLOAD_REQUEST} Too big payload message handling [Documentation] VES-HV Collector should interrupt the stream when a message with too big payload is encountered @@ -86,6 +95,15 @@ Unsupported domain message handling ... Assert Dcae App Consumed ${DEFAULT_PERF3GPP_TOPIC} ${AMOUNT_50000} Assert Dcae App Consumed Proper Messages ${DEFAULT_PERF3GPP_TOPIC} ${DCAE_UNSUPPORTED_DOMAIN_REQUEST} +Unsupported stndDefinedNamespace message handling + [Documentation] VES-HV Collector should skip messages with unsupported domain + + Send Messages From xNF Simulators ${XNF_SIMULATOR} ${XNF_UNSUPPORTED_NAMESPACE_REQUEST} + + Wait until keyword succeeds 60 sec 5 sec + ... Assert Dcae App Consumed ${DEFAULT_STNDDEFINED_3GPP_HEARTBEAT_TOPIC} ${AMOUNT_50000} + Assert Dcae App Consumed Proper Messages ${DEFAULT_STNDDEFINED_3GPP_HEARTBEAT_TOPIC} ${DCAE_UNSUPPORTED_NAMESPACE_REQUEST} + *** Variables *** ${HTTP_METHOD_URL} http:// @@ -93,16 +111,20 @@ ${XNF_SIM_API_PATH} /simulator/async ${HV_VES_SCENARIOS} %{WORKSPACE}/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios ${XNF_FIXED_PAYLOAD_REQUEST} ${HV_VES_SCENARIOS}/fixed-payload/xnf-fixed-payload-request.json +${XNF_STNDDEFINED_PAYLOAD_REQUEST} ${HV_VES_SCENARIOS}/stnd-defined/valid/xnf-stnd-defined-payload-request.json ${XNF_TOO_BIG_PAYLOAD_REQUEST} ${HV_VES_SCENARIOS}/too-big-payload/xnf-too-big-payload-request.json ${XNF_INVALID_WIRE_FRAME_REQUEST} ${HV_VES_SCENARIOS}/invalid-wire-frame/xnf-invalid-wire-frame-request.json ${XNF_INVALID_GPB_DATA_REQUEST} ${HV_VES_SCENARIOS}/invalid-gpb-data/xnf-invalid-gpb-data-request.json ${XNF_UNSUPPORTED_DOMAIN_REQUEST} ${HV_VES_SCENARIOS}/unsupported-domain/xnf-unsupported-domain-request.json +${XNF_UNSUPPORTED_NAMESPACE_REQUEST} ${HV_VES_SCENARIOS}/stnd-defined/unsupported-namespace/xnf-unsupported-namespace-request.json ${DCAE_FIXED_PAYLOAD_REQUEST} ${HV_VES_SCENARIOS}/fixed-payload/dcae-fixed-payload-request.json +${DCAE_STNDDEFINED_PAYLOAD_REQUEST} ${HV_VES_SCENARIOS}/stnd-defined/valid/dcae-stnd-defined-payload-request.json ${DCAE_TOO_BIG_PAYLOAD_REQUEST} ${HV_VES_SCENARIOS}/too-big-payload/dcae-too-big-payload-request.json ${DCAE_INVALID_WIRE_FRAME_REQUEST} ${HV_VES_SCENARIOS}/invalid-wire-frame/dcae-invalid-wire-frame-request.json ${DCAE_INVALID_GPB_DATA_REQUEST} ${HV_VES_SCENARIOS}/invalid-gpb-data/dcae-invalid-gpb-data-request.json ${DCAE_UNSUPPORTED_DOMAIN_REQUEST} ${HV_VES_SCENARIOS}/unsupported-domain/dcae-unsupported-domain-request.json +${DCAE_UNSUPPORTED_NAMESPACE_REQUEST} ${HV_VES_SCENARIOS}/stnd-defined/unsupported-namespace/dcae-unsupported-namespace-request.json ${AMOUNT_25000} 25000 ${AMOUNT_50000} 50000 diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/common-keywords.robot b/tests/dcaegen2-collectors-hv-ves/testcases/resources/common-keywords.robot index bab8a907..b943935d 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/common-keywords.robot +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/common-keywords.robot @@ -1,7 +1,7 @@ # ============LICENSE_START======================================================= # csit-dcaegen2-collectors-hv-ves # ================================================================================ -# Copyright (C) 2018-2019 NOKIA +# Copyright (C) 2018-2021 NOKIA # Modification copyright (C) 2021 Samsung Electronics Co., Ltd. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); @@ -63,6 +63,7 @@ Send Messages From xNF Simulators VES-HV Collector Test Shutdown Reset DCAE App Simulator ${DEFAULT_PERF3GPP_TOPIC} Reset DCAE App Simulator ${SECOND_PERF3GPP_TOPIC} + Reset DCAE App Simulator ${DEFAULT_STNDDEFINED_3GPP_HEARTBEAT_TOPIC} VES-HV Collector Suite Teardown diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/hv-ves-configuration.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/hv-ves-configuration.json index d932b7d9..019e4680 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/hv-ves-configuration.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/hv-ves-configuration.json @@ -10,6 +10,17 @@ "bootstrap_servers": "kafka:9092", "topic_name": "TEST_HV_VES_PERF3GPP" } + }, + "ves-3gpp-heartbeat": { + "type": "kafka", + "aaf_credentials": { + "username": "admin", + "password": "admin_secret" + }, + "kafka_info": { + "bootstrap_servers": "kafka:9092", + "topic_name": "TEST_SEC_3GPP_HEARTBEAT_OUTPUT" + } } } } diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/stnd-defined/unsupported-namespace/dcae-unsupported-namespace-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/stnd-defined/unsupported-namespace/dcae-unsupported-namespace-request.json new file mode 100644 index 00000000..1e75e484 --- /dev/null +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/stnd-defined/unsupported-namespace/dcae-unsupported-namespace-request.json @@ -0,0 +1,25 @@ +[ + { + "commonEventHeader": { + "version": "sample-version", + "domain": "stndDefined", + "sequence": 1, + "priority": 1, + "eventId": "sample-event-id", + "eventName": "sample-event-name", + "eventType": "sample-event-type", + "startEpochMicrosec": 120034455, + "lastEpochMicrosec": 120034455, + "nfNamingCode": "sample-nf-naming-code", + "nfcNamingCode": "sample-nfc-naming-code", + "reportingEntityId": "sample-reporting-entity-id", + "reportingEntityName": "sample-reporting-entity-name", + "sourceId": "sample-source-id", + "sourceName": "sample-source-name", + "vesEventListenerVersion": "7.2.0", + "stndDefinedNamespace": "ves-3gpp-heartbeat" + }, + "messageType": "VALID", + "messagesAmount": 50000 + } +] diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/stnd-defined/unsupported-namespace/xnf-unsupported-namespace-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/stnd-defined/unsupported-namespace/xnf-unsupported-namespace-request.json new file mode 100644 index 00000000..02c0e840 --- /dev/null +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/stnd-defined/unsupported-namespace/xnf-unsupported-namespace-request.json @@ -0,0 +1,71 @@ +[ + { + "commonEventHeader": { + "version": "sample-version", + "domain": "stndDefined", + "sequence": 1, + "priority": 1, + "eventId": "sample-event-id", + "eventName": "sample-event-name", + "eventType": "sample-event-type", + "startEpochMicrosec": 120034455, + "lastEpochMicrosec": 120034455, + "nfNamingCode": "sample-nf-naming-code", + "nfcNamingCode": "sample-nfc-naming-code", + "reportingEntityId": "sample-reporting-entity-id", + "reportingEntityName": "sample-reporting-entity-name", + "sourceId": "sample-source-id", + "sourceName": "sample-source-name", + "vesEventListenerVersion": "7.2.0", + "stndDefinedNamespace": "ves-3gpp-heartbeat" + }, + "messageType": "VALID", + "messagesAmount": 25000 + }, + { + "commonEventHeader": { + "version": "sample-version", + "domain": "stndDefined", + "sequence": 1, + "priority": 1, + "eventId": "sample-event-id", + "eventName": "sample-event-name", + "eventType": "sample-event-type", + "startEpochMicrosec": 120034455, + "lastEpochMicrosec": 120034455, + "nfNamingCode": "sample-nf-naming-code", + "nfcNamingCode": "sample-nfc-naming-code", + "reportingEntityId": "sample-reporting-entity-id", + "reportingEntityName": "sample-reporting-entity-name", + "sourceId": "sample-source-id", + "sourceName": "sample-source-name", + "vesEventListenerVersion": "7.2.0", + "stndDefinedNamespace": "ves-3gpp-unknown-stream" + }, + "messageType": "VALID", + "messagesAmount": 100 + }, + { + "commonEventHeader": { + "version": "sample-version", + "domain": "stndDefined", + "sequence": 1, + "priority": 1, + "eventId": "sample-event-id", + "eventName": "sample-event-name", + "eventType": "sample-event-type", + "startEpochMicrosec": 120034455, + "lastEpochMicrosec": 120034455, + "nfNamingCode": "sample-nf-naming-code", + "nfcNamingCode": "sample-nfc-naming-code", + "reportingEntityId": "sample-reporting-entity-id", + "reportingEntityName": "sample-reporting-entity-name", + "sourceId": "sample-source-id", + "sourceName": "sample-source-name", + "vesEventListenerVersion": "7.2.0", + "stndDefinedNamespace": "ves-3gpp-heartbeat" + }, + "messageType": "VALID", + "messagesAmount": 25000 + } +] diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/stnd-defined/valid/dcae-stnd-defined-payload-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/stnd-defined/valid/dcae-stnd-defined-payload-request.json new file mode 100644 index 00000000..56371dbc --- /dev/null +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/stnd-defined/valid/dcae-stnd-defined-payload-request.json @@ -0,0 +1,25 @@ +[ + { + "commonEventHeader": { + "version": "sample-version", + "domain": "stndDefined", + "sequence": 1, + "priority": 1, + "eventId": "sample-event-id", + "eventName": "sample-event-name", + "eventType": "sample-event-type", + "startEpochMicrosec": 120034455, + "lastEpochMicrosec": 120034455, + "nfNamingCode": "sample-nf-naming-code", + "nfcNamingCode": "sample-nfc-naming-code", + "reportingEntityId": "sample-reporting-entity-id", + "reportingEntityName": "sample-reporting-entity-name", + "sourceId": "sample-source-id", + "sourceName": "sample-source-name", + "vesEventListenerVersion": "7.2.0", + "stndDefinedNamespace": "ves-3gpp-heartbeat" + }, + "messageType": "VALID", + "messagesAmount": 25000 + } +] \ No newline at end of file diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/stnd-defined/valid/xnf-stnd-defined-payload-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/stnd-defined/valid/xnf-stnd-defined-payload-request.json new file mode 100644 index 00000000..56371dbc --- /dev/null +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/stnd-defined/valid/xnf-stnd-defined-payload-request.json @@ -0,0 +1,25 @@ +[ + { + "commonEventHeader": { + "version": "sample-version", + "domain": "stndDefined", + "sequence": 1, + "priority": 1, + "eventId": "sample-event-id", + "eventName": "sample-event-name", + "eventType": "sample-event-type", + "startEpochMicrosec": 120034455, + "lastEpochMicrosec": 120034455, + "nfNamingCode": "sample-nf-naming-code", + "nfcNamingCode": "sample-nfc-naming-code", + "reportingEntityId": "sample-reporting-entity-id", + "reportingEntityName": "sample-reporting-entity-name", + "sourceId": "sample-source-id", + "sourceName": "sample-source-name", + "vesEventListenerVersion": "7.2.0", + "stndDefinedNamespace": "ves-3gpp-heartbeat" + }, + "messageType": "VALID", + "messagesAmount": 25000 + } +] \ No newline at end of file