diff options
Diffstat (limited to 'tests')
18 files changed, 50 insertions, 36 deletions
diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot b/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot index 7b99fb0d..60580083 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot +++ b/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot @@ -50,7 +50,7 @@ ${DCAE_APP_API_MESSAGES_PATH} /messages/all ${DCAE_APP_API_MESSAGES_COUNT_PATH} ${DCAE_APP_API_MESSAGES_PATH}/count ${DCAE_APP_API_MESSAGES_VALIDATION_PATH} ${DCAE_APP_API_MESSAGES_PATH}/validate -${ROUTED_MESSAGES_TOPIC} test-hv-ran-meas +${ROUTED_MESSAGES_TOPIC} TEST_HV_VES_PERF3GPP ${VES_HV_RESOURCES} %{WORKSPACE}/tests/dcaegen2-collectors-hv-ves/testcases/resources ${VES_HV_CONFIGURATION_JSON_FILEPATH} ${VES_HV_RESOURCES}/ves-hv-configuration.json diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/authorization/xnf-valid-messages-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/authorization/xnf-valid-messages-request.json index 9aca4015..eabb9ce1 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/authorization/xnf-valid-messages-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/authorization/xnf-valid-messages-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "PERF3GPP", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/dcae-fixed-payload-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/dcae-fixed-payload-request.json index 642c7d56..f0c169da 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/dcae-fixed-payload-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/dcae-fixed-payload-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "PERF3GPP", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/xnf-fixed-payload-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/xnf-fixed-payload-request.json index 642c7d56..f0c169da 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/xnf-fixed-payload-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/xnf-fixed-payload-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "PERF3GPP", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/dcae-invalid-gpb-data-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/dcae-invalid-gpb-data-request.json index f38e9aa0..76b51931 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/dcae-invalid-gpb-data-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/dcae-invalid-gpb-data-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "PERF3GPP", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/xnf-invalid-gpb-data-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/xnf-invalid-gpb-data-request.json index 22d48c5f..281b66b7 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/xnf-invalid-gpb-data-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/xnf-invalid-gpb-data-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "PERF3GPP", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -24,7 +24,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "PERF3GPP", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -46,7 +46,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "PERF3GPP", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/dcae-invalid-wire-frame-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/dcae-invalid-wire-frame-request.json index f38e9aa0..76b51931 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/dcae-invalid-wire-frame-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/dcae-invalid-wire-frame-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "PERF3GPP", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/xnf-invalid-wire-frame-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/xnf-invalid-wire-frame-request.json index a7d22190..6d50cc99 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/xnf-invalid-wire-frame-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/xnf-invalid-wire-frame-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "PERF3GPP", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -24,7 +24,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "PERF3GPP", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -46,7 +46,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "PERF3GPP", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/dcae-smaller-valid-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/dcae-smaller-valid-request.json index 89f3e067..5614c353 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/dcae-smaller-valid-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/dcae-smaller-valid-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "PERF3GPP", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/xnf-simulator-smaller-valid-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/xnf-simulator-smaller-valid-request.json index 60c81a89..18cde57b 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/xnf-simulator-smaller-valid-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/xnf-simulator-smaller-valid-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "PERF3GPP", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/too-big-payload/xnf-too-big-payload-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/too-big-payload/xnf-too-big-payload-request.json index 54836bf3..6dab0112 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/too-big-payload/xnf-too-big-payload-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/too-big-payload/xnf-too-big-payload-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "PERF3GPP", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -24,7 +24,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "PERF3GPP", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -46,7 +46,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "PERF3GPP", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/dcae-unsupported-domain-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/dcae-unsupported-domain-request.json index f38e9aa0..76b51931 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/dcae-unsupported-domain-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/dcae-unsupported-domain-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "PERF3GPP", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/xnf-unsupported-domain-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/xnf-unsupported-domain-request.json index b3aada5b..58f7c978 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/xnf-unsupported-domain-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/xnf-unsupported-domain-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "PERF3GPP", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -46,7 +46,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "PERF3GPP", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/ves-hv-configuration.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/ves-hv-configuration.json index b9e1a4b5..6404c6c1 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/ves-hv-configuration.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/ves-hv-configuration.json @@ -2,8 +2,8 @@ "dmaap.kafkaBootstrapServers": "kafka:9092", "collector.routing": [ { - "fromDomain": "HVMEAS", - "toTopic": "test-hv-ran-meas" + "fromDomain": "PERF3GPP", + "toTopic": "TEST_HV_VES_PERF3GPP" } ] }
\ No newline at end of file diff --git a/tests/dcaegen2/prh-testcases/assets/json_events/event_without_IPV6_field.json b/tests/dcaegen2/prh-testcases/assets/json_events/event_without_IPV6_field.json new file mode 100644 index 00000000..0aa0372c --- /dev/null +++ b/tests/dcaegen2/prh-testcases/assets/json_events/event_without_IPV6_field.json @@ -0,0 +1,10 @@ +{ + "event": { + "commonEventHeader": { + "sourceName":"NOK6061ZW9" + }, + "pnfRegistrationFields": { + "oamV4IpAddress":"10.17.123.24" + } + } +} diff --git a/tests/dcaegen2/prh-testcases/prh_tests.robot b/tests/dcaegen2/prh-testcases/prh_tests.robot index 55f484fa..62698455 100644 --- a/tests/dcaegen2/prh-testcases/prh_tests.robot +++ b/tests/dcaegen2/prh-testcases/prh_tests.robot @@ -18,6 +18,7 @@ ${EVENT_WITH_MISSING_SOURCENAME} %{WORKSPACE}/tests/dcaegen2/prh-testcases/as ${EVENT_WITH_MISSING_SOURCENAME_AND_IPV4} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName_and_IPV4.json ${EVENT_WITH_MISSING_SOURCENAME_AND_IPV6} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName_and_IPV6.json ${EVENT_WITH_MISSING_SOURCENAME_IPV4_AND_IPV6} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName_IPV4_and_IPV6.json +${EVENT_WITHOUT_IPV6_FILED} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_without_IPV6_field.json ${Not_json_format} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/not_json_format.json *** Test Cases *** @@ -28,6 +29,7 @@ Valid DMaaP event can be converted to PNF_READY notification ${EVENT_WITH_ALL_VALID_REQUIRED_FIELDS} ${EVENT_WITH_IPV4} ${EVENT_WITH_IPV6} + ${EVENT_WITHOUT_IPV6_FILED} Invalid DMaaP event cannot be converted to PNF_READY notification [Documentation] PRH get invalid event from DMaaP with missing required fields - PRH does not produce PNF_READY notification diff --git a/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py b/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py index 6a95c71e..656f6fc3 100644 --- a/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py +++ b/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py @@ -21,18 +21,18 @@ class PrhLibrary(object): @staticmethod def create_pnf_ready_notification(json_file): json_to_python = json.loads(json_file) - ipv4 = json_to_python["event"]["pnfRegistrationFields"]["oamV4IpAddress"] - ipv6 = json_to_python["event"]["pnfRegistrationFields"]["oamV6IpAddress"] - correlationId = json_to_python["event"]["commonEventHeader"]["sourceName"] - str_json = '{"correlationId":"' + correlationId + '","ipaddress-v4-oam":"' + ipv4 + '","ipaddress-v6-oam":"' + ipv6 + '"}' + ipv4 = json_to_python.get("event").get("pnfRegistrationFields").get("oamV4IpAddress") + ipv6 = json_to_python.get("event").get("pnfRegistrationFields").get("oamV6IpAddress") if "oamV6IpAddress" in json_to_python["event"]["pnfRegistrationFields"] else "" + correlation_id = json_to_python.get("event").get("commonEventHeader").get("sourceName") + str_json = '{"correlationId":"' + correlation_id + '","ipaddress-v4-oam":"' + ipv4 + '","ipaddress-v6-oam":"' + ipv6 + '"}' python_to_json = json.dumps(str_json) return python_to_json.replace("\\", "")[1:-1] @staticmethod def create_pnf_name(json_file): json_to_python = json.loads(json_file) - correlationId = json_to_python["event"]["commonEventHeader"]["sourceName"] - return correlationId + correlation_id = json_to_python.get("sourceName") + return correlation_id @staticmethod def stop_aai(): diff --git a/tests/dmaap-datarouter/dr-suite/dr-suite.robot b/tests/dmaap-datarouter/dr-suite/dr-suite.robot index fcac2026..d00bddc7 100755 --- a/tests/dmaap-datarouter/dr-suite/dr-suite.robot +++ b/tests/dmaap-datarouter/dr-suite/dr-suite.robot @@ -10,7 +10,8 @@ ${TARGET_URL} https://${DR_PROV_IP}:8443 ${TARGET_URL_FEED} https://${DR_PROV_IP}:8443/feed/1 ${TARGET_URL_SUBSCRIBE} https://${DR_PROV_IP}:8443/subscribe/1 ${TARGET_URL_SUBSCRIPTION} https://${DR_PROV_IP}:8443/subs/1 -${TARGET_URL_PUBLISH} https://${DR_NODE_IP}:8443/publish/1/csit_test +${TARGET_URL_PUBLISH_PROV} https://${DR_PROV_IP}:8443/publish/1/csit_test +${TARGET_URL_PUBLISH_NODE} https://${DR_NODE_IP}:8443/publish/1/csit_test ${CREATE_FEED_DATA} {"name": "CSIT_Test", "version": "m1.0", "description": "CSIT_Test", "business_description": "CSIT_Test", "suspend": false, "deleted": false, "changeowner": true, "authorization": {"classification": "unclassified", "endpoint_addrs": [], "endpoint_ids": [{"password": "rs873m", "id": "rs873m"}]}} ${UPDATE_FEED_DATA} {"name": "CSIT_Test", "version": "m1.0", "description": "UPDATED-CSIT_Test", "business_description": "CSIT_Test", "suspend": true, "deleted": false, "changeowner": true, "authorization": {"classification": "unclassified", "endpoint_addrs": [], "endpoint_ids": [{"password": "rs873m", "id": "rs873m"}]}} ${SUBSCRIBE_DATA} {"delivery":{ "url":"https://${DR_PROV_IP}:8080/", "user":"rs873m", "password":"rs873m", "use100":true}, "metadataOnly":false, "suspend":false, "groupid":29, "subscriber":"sg481n"} @@ -42,9 +43,10 @@ Run Publish Feed [Documentation] Publish to Feed [Timeout] 1 minute Sleep 10s Behaviour was noticed where feed was not created in time for publish to be sent - ${resp}= PutCall ${TARGET_URL_PUBLISH} ${CREATE_FEED_DATA} ${PUBLISH_FEED_CONTENT_TYPE} rs873m - log ${TARGET_URL_PUBLISH} - log ${resp.text} + ${resp}= PutCall ${TARGET_URL_PUBLISH_PROV} ${CREATE_FEED_DATA} ${PUBLISH_FEED_CONTENT_TYPE} rs873m + log ${TARGET_URL_PUBLISH_PROV} + Should Contain ${resp.headers['Location']} https://dmaap-dr-node:8443/publish/1/csit_test + ${resp}= PutCall ${TARGET_URL_PUBLISH_NODE} ${CREATE_FEED_DATA} ${PUBLISH_FEED_CONTENT_TYPE} rs873m Should Be Equal As Strings ${resp.status_code} 204 log 'JSON Response Code:'${resp} @@ -94,23 +96,23 @@ Run Delete Feed PostCall [Arguments] ${url} ${data} ${content_type} ${user} ${headers}= Create Dictionary X-ATT-DR-ON-BEHALF-OF=${user} Content-Type=${content_type} - ${resp}= Evaluate requests.post('${url}',data='${data}', headers=${headers},verify=False) requests + ${resp}= Evaluate requests.post('${url}', data='${data}', headers=${headers}, verify=False) requests [Return] ${resp} PutCall [Arguments] ${url} ${data} ${content_type} ${user} ${headers}= Create Dictionary X-ATT-DR-ON-BEHALF-OF=${user} Content-Type=${content_type} Authorization=Basic cnM4NzNtOnJzODczbQ== - ${resp}= Evaluate requests.put('${url}',data='${data}', headers=${headers},verify=False) requests + ${resp}= Evaluate requests.put('${url}', data='${data}', headers=${headers}, verify=False, allow_redirects=False) requests [Return] ${resp} GetCall [Arguments] ${url} ${content_type} ${user} ${headers}= Create Dictionary X-ATT-DR-ON-BEHALF-OF=${user} Content-Type=${content_type} - ${resp}= Evaluate requests.get('${url}', headers=${headers},verify=False) requests + ${resp}= Evaluate requests.get('${url}', headers=${headers}, verify=False) requests [Return] ${resp} DeleteCall [Arguments] ${url} ${user} ${headers}= Create Dictionary X-ATT-DR-ON-BEHALF-OF=${user} - ${resp}= Evaluate requests.delete('${url}', headers=${headers},verify=False) requests + ${resp}= Evaluate requests.delete('${url}', headers=${headers}, verify=False) requests [Return] ${resp} |