Add Test case for missing param in one of the events send to VES eventBatch API 59/101959/3
authormprzybys <marcin.przybysz@nokia.com>
Wed, 19 Feb 2020 08:36:01 +0000 (08:36 +0000)
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>
Tue, 25 Feb 2020 11:15:37 +0000 (11:15 +0000)
Issue-ID: INT-1454

Signed-off-by: Marcin Przybysz <marcin.przybysz@nokia.com>
Change-Id: I8bb2604a2d35ffee1660ef0b44a3a0a6fcb3dcd3

tests/dcaegen2/testcases/assets/json_events/ves7_batch_missing_mandatory_parameter.json [new file with mode: 0644]
tests/dcaegen2/testcases/dcae_ves.robot
tests/dcaegen2/testcases/resources/dcae_properties.robot

diff --git a/tests/dcaegen2/testcases/assets/json_events/ves7_batch_missing_mandatory_parameter.json b/tests/dcaegen2/testcases/assets/json_events/ves7_batch_missing_mandatory_parameter.json
new file mode 100644 (file)
index 0000000..48e97d0
--- /dev/null
@@ -0,0 +1,64 @@
+{
+   "eventList": [
+      {
+         "commonEventHeader": {
+            "version": "4.0.1",
+            "vesEventListenerVersion": "7.0.1",
+            "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
index 739c2bb..61ebf4d 100644 (file)
@@ -70,7 +70,12 @@ Publish VES VoLTE Fault Batch Events
 Publish VES Batch Events with empty json
     [Tags]    DCAE-VESC-R1
     [Documentation]   Post empty json 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_PATH}  ${VES_EMPTY_JSON}  400
+    Send Request And Validate Response  Publish Event To VES Collector  ${http_session}  ${VES_BATCH_EVENT_ENDPOINT_V7}  ${VES_EMPTY_JSON}  400
+
+Publish VES Batch Events with missing mandatory parameter
+    [Tags]    DCAE-VESC-R1
+    [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 Event With Invalid Method
     [Tags]    DCAE-VESC-R1
index a5f32b2..dfb5bd8 100644 (file)
@@ -35,6 +35,7 @@ ${VES_PARAMETER_OUT_OF_SCHEMA_V7}        %{WORKSPACE}/tests/dcaegen2/testcases/a
 ${VES_MISSING_MANDATORY_PARAMETER_V7}    %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves7_missing_mandatory_parameter.json
 ${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
 ${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