diff options
author | mprzybys <marcin.przybysz@nokia.com> | 2020-02-19 08:50:51 +0000 |
---|---|---|
committer | Bartek Grzybowski <b.grzybowski@partner.samsung.com> | 2020-02-25 11:15:45 +0000 |
commit | 5bcc97fd9e59c748e781f555f8916cc14ca04740 (patch) | |
tree | 7740292e9e92a99f682e1239e3edbb85de73a0d2 /tests/dcaegen2 | |
parent | 8414d30a6ec220bce32cb8d33b26071a8703165d (diff) |
Add Test case for parameter out of schema send to VES eventBatch API
Issue-ID: INT-1455
Signed-off-by: Marcin Przybysz <marcin.przybysz@nokia.com>
Change-Id: Idb4fe6fbd2e7d61cb6f87b5bcb59db774a5edac4
Diffstat (limited to 'tests/dcaegen2')
3 files changed, 73 insertions, 1 deletions
diff --git a/tests/dcaegen2/testcases/assets/json_events/ves7_batch_parameter_out_of_schema.json b/tests/dcaegen2/testcases/assets/json_events/ves7_batch_parameter_out_of_schema.json new file mode 100644 index 00000000..5245fead --- /dev/null +++ b/tests/dcaegen2/testcases/assets/json_events/ves7_batch_parameter_out_of_schema.json @@ -0,0 +1,66 @@ +{ + "eventList": [ + { + "commonEventHeader": { + "version": "4.0.1", + "vesEventListenerVersion": "7.0.1", + "domain": "fault", + "dummy": "dummy_value", + "eventName": "Fault_Vscf:Acs-Ericcson_PilotNumberPoolExhaustion", + "eventId": "fault0000250", + "sequence": 1, + "priority": "High", + "reportingEntityId": "cc305d54-75b4-431b-adb2-eb6b9e541234", + "reportingEntityName": "ibcx0001vm002oam0011234", + "sourceId": "de305d54-75b4-431b-adb2-eb6b9e546014", + "sourceName": "scfx0001vm002cap001", + "nfVendorName": "Ericsson", + "nfNamingCode": "scfx", + "nfcNamingCode": "ssc", + "startEpochMicrosec": 1413378172000000, + "lastEpochMicrosec": 1413378172000000, + "timeZoneOffset": "UTC-05:30" + }, + "faultFields": { + "faultFieldsVersion": "4.0", + "alarmCondition": "PilotNumberPoolExhaustion", + "eventSourceType": "other", + "specificProblem": "Calls cannot complete - pilot numbers are unavailable", + "eventSeverity": "CRITICAL", + "vfStatus": "Active", + "alarmAdditionalInformation": { + "PilotNumberPoolSize": "1000" + } + } + }, + { + "commonEventHeader": { + "version": "4.0.1", + "vesEventListenerVersion": "7.0.1", + "domain": "fault", + "eventName": " Fault_Vscf:Acs-Ericcson_RecordingServerUnreachable", + "eventId": "fault0000251", + "sequence": 0, + "priority": "High", + "reportingEntityId": "cc305d54-75b4-431b-adb2-eb6b9e541234", + "reportingEntityName": "ibcx0001vm002oam0011234", + "sourceId": "de305d54-75b4-431b-adb2-eb6b9e546014", + "sourceName": "scfx0001vm002cap001", + "nfVendorName": "Ericsson", + "nfNamingCode": "scfx", + "nfcNamingCode": "ssc", + "startEpochMicrosec": 1413378172000010, + "lastEpochMicrosec": 1413378172000010, + "timeZoneOffset": "UTC-05:30" + }, + "faultFields": { + "faultFieldsVersion": "4.0", + "alarmCondition": "RecordingServerUnreachable", + "eventSourceType": "other", + "specificProblem": "Recording server unreachable", + "eventSeverity": "CRITICAL", + "vfStatus": "Active" + } + } + ] +}
\ No newline at end of file diff --git a/tests/dcaegen2/testcases/dcae_ves.robot b/tests/dcaegen2/testcases/dcae_ves.robot index 61ebf4df..60aed5ff 100644 --- a/tests/dcaegen2/testcases/dcae_ves.robot +++ b/tests/dcaegen2/testcases/dcae_ves.robot @@ -41,7 +41,7 @@ Publish Single VES VNF Measurement Event with empty json [Documentation] Post single event with empty json to /eventListener/v7 endpoint and expect 400 Response Status Code Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_EVENTLISTENER_V7} ${VES_EMPTY_JSON} 400 -Publish Single VES VNF Measurement Event wit parameter out of schema +Publish Single VES VNF Measurement Event with parameter out of schema [Tags] DCAE-VESC-R1 [Documentation] Post single event with parameter which is not defined in schema and send to /eventListener/v7 endpoint. Expected 400 Response Status Code Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_EVENTLISTENER_V7} ${VES_PARAMETER_OUT_OF_SCHEMA_V7} 400 @@ -77,6 +77,11 @@ Publish VES Batch Events with missing mandatory parameter [Documentation] Post event list where one of the events doesn't have mandatory domain param, to /eventListener/v7/eventBatch endpoint and expect 400 Response Status Code Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_BATCH_EVENT_ENDPOINT_V7} ${VES_BATCH_MISSING_MANDATORY_PARAM_V7} 400 +Publish VES Batch Events wih parameter out of schema + [Tags] DCAE-VESC-R1 + [Documentation] Post event list where one of the events have additional dummy param, to /eventListener/v7/eventBatch endpoint and expect 400 Response Status Code + Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_BATCH_EVENT_ENDPOINT_V7} ${VES_BATCH_PARAM_OUT_OF_SCHEMA_V7} 400 + Publish VES Event With Invalid Method [Tags] DCAE-VESC-R1 [Documentation] Use invalid Put instead of Post method to expect 405 Response Status Code diff --git a/tests/dcaegen2/testcases/resources/dcae_properties.robot b/tests/dcaegen2/testcases/resources/dcae_properties.robot index dfb5bd89..587661c3 100644 --- a/tests/dcaegen2/testcases/resources/dcae_properties.robot +++ b/tests/dcaegen2/testcases/resources/dcae_properties.robot @@ -36,6 +36,7 @@ ${VES_MISSING_MANDATORY_PARAMETER_V7} %{WORKSPACE}/tests/dcaegen2/testcases/a ${VES_EMPTY_JSON} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_empty_json.json ${VES_VALID_BATCH_JSON_V7} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves7_batch_valid.json ${VES_BATCH_MISSING_MANDATORY_PARAM_V7} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves7_batch_missing_mandatory_parameter.json +${VES_BATCH_PARAM_OUT_OF_SCHEMA_V7} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves7_batch_parameter_out_of_schema.json ${EVENT_DATA_FILE} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_volte_single_fault_event.json ${EVENT_MEASURE_FILE} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_vfirewall_measurement.json ${EVENT_DATA_FILE_BAD} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_volte_single_fault_event_bad.json |