Add test case for missing mandatory "domain" parameter in /eventListener/v7 VES API 56/100856/1
authormprzybys <marcin.przybysz@nokia.com>
Tue, 28 Jan 2020 13:36:53 +0000 (13:36 +0000)
committermprzybys <marcin.przybysz@nokia.com>
Tue, 28 Jan 2020 13:58:48 +0000 (13:58 +0000)
Issue-ID: INT-1421

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

tests/dcaegen2/testcases/assets/json_events/ves7_missing_mandatory_domain.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_missing_mandatory_domain.json b/tests/dcaegen2/testcases/assets/json_events/ves7_missing_mandatory_domain.json
new file mode 100644 (file)
index 0000000..5178755
--- /dev/null
@@ -0,0 +1,33 @@
+{
+    "event": {
+        "commonEventHeader": {
+            "version": "4.0.1",
+            "vesEventListenerVersion": "7.0.1",
+            "eventName": "Fault_Vscf:Acs-Ericcson_PilotNumberPoolExhaustion",
+            "eventId": "ab305d54-85b4-a31b-7db2-fb6b9e546015",
+            "sequence": 1,
+            "priority": "High",
+            "reportingEntityId": "cc305d54-75b4-431b-adb2-eb6b9e541234",
+            "reportingEntityName": "ibcx0001vm002oam001",
+            "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"
+            }
+        }
+    }
+}
index 48912e1..e12097e 100644 (file)
@@ -31,6 +31,11 @@ Publish Single VES VNF Measurement Event with wrong JSON
     [Documentation]   Post single event with invalid data 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_INVALID_JSON_V7}  400
 
+Publish Single VES VNF Measurement Event with missing mandatory parameter domain
+    [Tags]    DCAE-VESC-R1
+    [Documentation]   Post single event with lack of one of the mandatory parameters "domain" 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_MISSING_MANDATORY_DOMAIN_V7}  400
+
 Publish Single VES VNF Measurement Event with No Auth over HTTPS
     [Tags]    DCAE-VESC-R1
     [Documentation]   Post single event over HTTPS with authentication disabled and expect ConnectionError
index 119ef23..5262330 100644 (file)
@@ -31,6 +31,7 @@ ${VES_EVENTLISTENER_V7}                  /eventListener/v7
 ${VES_BATCH_EVENT_ENDPOINT_V7}           /eventListener/v7/eventBatch
 ${VES_VALID_JSON_V7}                     %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves7_valid.json
 ${VES_INVALID_JSON_V7}                   %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves7_invalid.json
+${VES_MISSING_MANDATORY_DOMAIN_V7}       %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves7_missing_mandatory_domain.json
 ${VES_VALID_BATCH_JSON_V7}               %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves7_batch_valid.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