Add Test case for parameter out of schema send to VES eventListener API 09/101909/3
authormprzybys <marcin.przybysz@nokia.com>
Tue, 18 Feb 2020 14:08:01 +0000 (14:08 +0000)
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>
Tue, 25 Feb 2020 11:15:15 +0000 (11:15 +0000)
Issue-ID: INT-1449

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

tests/dcaegen2/testcases/assets/json_events/ves7_parameter_out_of_schema.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_parameter_out_of_schema.json b/tests/dcaegen2/testcases/assets/json_events/ves7_parameter_out_of_schema.json
new file mode 100644 (file)
index 0000000..1e86758
--- /dev/null
@@ -0,0 +1,35 @@
+{
+    "event": {
+        "commonEventHeader": {
+            "version": "4.0.1",
+            "dummy": "dummy_value",
+            "vesEventListenerVersion": "7.0.1",
+            "domain": "fault",
+            "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"
+            }
+        }
+    }
+}
\ No newline at end of file
index c163575..d53846c 100644 (file)
@@ -41,6 +41,11 @@ 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
+    [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
+
 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 f287ba6..a5f32b2 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_PARAMETER_OUT_OF_SCHEMA_V7}        %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves7_parameter_out_of_schema.json
 ${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