aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormprzybys <marcin.przybysz@nokia.com>2020-02-18 14:08:01 +0000
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>2020-02-25 11:15:15 +0000
commit038028c1ab4b6c641ba031feb38c854dd2c6926d (patch)
tree4985297578d3b4ea2410795dc97c7e4052599a6f
parent86fabf65c621914e38458d5362c78f9bce79c3a9 (diff)
Add Test case for parameter out of schema send to VES eventListener API
Issue-ID: INT-1449 Signed-off-by: Marcin Przybysz <marcin.przybysz@nokia.com> Change-Id: I4918b97828f5a220927eb97175356ab3a171ed70
-rw-r--r--tests/dcaegen2/testcases/assets/json_events/ves7_parameter_out_of_schema.json35
-rw-r--r--tests/dcaegen2/testcases/dcae_ves.robot5
-rw-r--r--tests/dcaegen2/testcases/resources/dcae_properties.robot1
3 files changed, 41 insertions, 0 deletions
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
index 00000000..1e867581
--- /dev/null
+++ b/tests/dcaegen2/testcases/assets/json_events/ves7_parameter_out_of_schema.json
@@ -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
diff --git a/tests/dcaegen2/testcases/dcae_ves.robot b/tests/dcaegen2/testcases/dcae_ves.robot
index c1635758..d53846c6 100644
--- a/tests/dcaegen2/testcases/dcae_ves.robot
+++ b/tests/dcaegen2/testcases/dcae_ves.robot
@@ -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
diff --git a/tests/dcaegen2/testcases/resources/dcae_properties.robot b/tests/dcaegen2/testcases/resources/dcae_properties.robot
index f287ba69..a5f32b23 100644
--- a/tests/dcaegen2/testcases/resources/dcae_properties.robot
+++ b/tests/dcaegen2/testcases/resources/dcae_properties.robot
@@ -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