aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksandra Maciaga <aleksandra.maciaga@nokia.com>2020-07-07 15:33:15 +0200
committerAleksandra Maciaga <aleksandra.maciaga@nokia.com>2020-07-07 15:33:15 +0200
commitcb445594e67fc647f2f10eb741c00e54d0c91a27 (patch)
treecbf726e73e1966039521e612823eeaa1a20ed323
parent5c5599007d24eac42ec5181079cbedf2678f81e9 (diff)
Add CSIT for new VES domain
Issue-ID: DCAEGEN2-2254 Signed-off-by: Aleksandra Maciaga <aleksandra.maciaga@nokia.com> Change-Id: Idc928bc93eb432e8d93291780a9d4796bcb2561f
-rw-r--r--tests/dcaegen2/testcases/assets/json_events/ves7_valid_eventWithStndDefinedFields.json49
-rw-r--r--tests/dcaegen2/testcases/dcae_ves.robot11
-rwxr-xr-xtests/dcaegen2/testcases/resources/collector.properties10
-rw-r--r--tests/dcaegen2/testcases/resources/dcae_properties.robot1
4 files changed, 65 insertions, 6 deletions
diff --git a/tests/dcaegen2/testcases/assets/json_events/ves7_valid_eventWithStndDefinedFields.json b/tests/dcaegen2/testcases/assets/json_events/ves7_valid_eventWithStndDefinedFields.json
new file mode 100644
index 00000000..5d40b9d9
--- /dev/null
+++ b/tests/dcaegen2/testcases/assets/json_events/ves7_valid_eventWithStndDefinedFields.json
@@ -0,0 +1,49 @@
+{
+ "event": {
+ "commonEventHeader": {
+ "domain": "stndDefined",
+ "eventId": "stndDefined-gNB_Nokia000001",
+ "eventName": "stndDefined-gNB-Nokia-PowerLost",
+ "stndDefinedNamespace": "3GPP-FaultSupervision",
+ "lastEpochMicrosec": 1234567890,
+ "priority": "Normal",
+ "reportingEntityName": "Nokia123456",
+ "sequence": 0,
+ "sourceName": "Nokia123456",
+ "startEpochMicrosec": 1234567890,
+ "version": "4.1",
+ "vesEventListenerVersion": "7.2"
+ },
+ "stndDefinedFields": {
+ "schemaReference": "https://www.3gpp.org/Rel-16/TS28532_generic_fault_supervision.json#definitions/schemas/notifyNewAlarm-NotifType",
+ "data": {
+ "header": {
+ "uri": "xyz",
+ "notificationId": "xyz",
+ "notificationType": "notifyNewAlarm",
+ "eventTime": "xyz",
+ "systemDN": "xyz"
+ },
+ "body": {
+ "probableCause": "xyz",
+ "perceivedSeverity": "Major",
+ "rootCauseIndicator": false,
+ "specificProblem": "xyz",
+ "correlatedNotifications": [],
+ "backedUpStatus": true,
+ "backUpObject": "xyz",
+ "trendIndication": "No change",
+ "thresholdInfo": {},
+ "stateChangeDefinition": [],
+ "monitoredAttributes": [],
+ "proposedRepairActions": "xyz",
+ "additionalText": "xyz",
+ "additionalInformation": [],
+ "alarmId": "xyz",
+ "alarmType": "Environmental Alarm"
+ }
+ },
+ "stndDefinedFieldsVersion": "1.0"
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/dcaegen2/testcases/dcae_ves.robot b/tests/dcaegen2/testcases/dcae_ves.robot
index 4a4a079d..5c96f48b 100644
--- a/tests/dcaegen2/testcases/dcae_ves.robot
+++ b/tests/dcaegen2/testcases/dcae_ves.robot
@@ -26,6 +26,11 @@ Publish Single VES VNF Measurement Event API V7
[Documentation] Post single event with valid data to /eventListener/v7 endpoint and expect 202 Response Status Code
Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7} 202 ab305d54-85b4-a31b-7db2-fb6b9e546015
+Publish Single VES VNF Measurement Event with Standard Defined Fields API V7
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post single event with valid data with Standard Defined Fields to /eventListener/v7 endpoint and expect 202 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7_STND_DEF_FIELDS} 202 stndDefined-gNB-Nokia-PowerLost
+
Publish Single VES VNF Measurement Event with wrong JSON
[Tags] DCAE-VESC-R1
[Documentation] Post single event with invalid data to /eventListener/v7 endpoint and expect 400 Response Status Code
@@ -171,6 +176,12 @@ Publish Single VES VNF Measurement Event with certBasicAuth over HTTPS
[Documentation] Post single event with valid data and valid username/password to /eventListener/v7 endpoint over HTTPS and expect 202 Response Status Code
Send Request And Validate Response Publish Event To VES Collector ${https_basic_auth_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7} 202 ab305d54-85b4-a31b-7db2-fb6b9e546015
+Publish Single VES VNF Measurement Event with Standard Defined Fields with certBasicAuth over HTTPS
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post single event with valid data with Standard Defined Fields and valid username/password to /eventListener/v7 endpoint over HTTPS and expect 202 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${https_basic_auth_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7_STND_DEF_FIELDS} 202 stndDefined-gNB-Nokia-PowerLost
+
+
Publish Single VES VNF Measurement Event over HTTPS with wrong JSON
[Tags] DCAE-VESC-R1
[Documentation] Post single event with invalid data and valid username/password to /eventListener/v7 endpoint over HTTPS and expect 400 Response Status Code
diff --git a/tests/dcaegen2/testcases/resources/collector.properties b/tests/dcaegen2/testcases/resources/collector.properties
index c555e485..71a38737 100755
--- a/tests/dcaegen2/testcases/resources/collector.properties
+++ b/tests/dcaegen2/testcases/resources/collector.properties
@@ -25,8 +25,6 @@ collector.service.secure.port=8443
# auth.method flags:
#
# noAuth - default option - no security (http)
-# certOnly - auth by certificate (https)
-# basicAuth - auth by basic auth username and password (https)
# certBasicAuth - auth by certificate and basic auth username / password (https)
auth.method=certBasicAuth
@@ -50,16 +48,16 @@ collector.truststore.passwordfile=etc/trustpasswordfile
## default no validation checkflag (-1)
## If enabled (1) - schemafile location must be specified
collector.schema.checkflag=1
-collector.schema.file={\"v1\":\"./etc/CommonEventFormat_27.2.json\",\"v2\":\"./etc/CommonEventFormat_27.2.json\",\"v3\":\"./etc/CommonEventFormat_27.2.json\",\"v4\":\"./etc/CommonEventFormat_27.2.json\",\"v5\":\"./etc/CommonEventFormat_28.4.1.json\",\"v7\":\"./etc/CommonEventFormat_30.0.1.json\"}
+collector.schema.file={\"v1\":\"./etc/CommonEventFormat_27.2.json\",\"v2\":\"./etc/CommonEventFormat_27.2.json\",\"v3\":\"./etc/CommonEventFormat_27.2.json\",\"v4\":\"./etc/CommonEventFormat_27.2.json\",\"v5\":\"./etc/CommonEventFormat_28.4.1.json\",\"v7\":\"./etc/CommonEventFormat_30.2_ONAP.json\"}
-## List all streamid per domain to be supported. The streamid should match to channel name on dmaapfile
-collector.dmaap.streamid=fault=ves-fault|syslog=ves-syslog|heartbeat=ves-heartbeat|measurementsForVfScaling=ves-measurement|mobileFlow=ves-mobileflow|other=ves-other|stateChange=ves-statechange|thresholdCrossingAlert=ves-thresholdCrossingAlert|voiceQuality=ves-voicequality|sipSignaling=ves-sipsignaling|notification=ves-notification|pnfRegistration=ves-pnfRegistration
+## List all streamid per domain to be supported. The streamid should match to channel name on dmaapfile
+collector.dmaap.streamid=fault=ves-fault|syslog=ves-syslog|heartbeat=ves-heartbeat|measurementsForVfScaling=ves-measurement|mobileFlow=ves-mobileflow|other=ves-other|stateChange=ves-statechange|thresholdCrossingAlert=ves-thresholdCrossingAlert|voiceQuality=ves-voicequality|sipSignaling=ves-sipsignaling|notification=ves-notification|pnfRegistration=ves-pnfRegistration|stndDefined=ves-other
collector.dmaapfile=./etc/DmaapConfig.json
## Event transformation Flag - when set expects configurable transformation
## defined under ./etc/eventTransform.json
## Enabled by default; to disable set to 0
-event.transform.flag=0
+event.transform.flag=1
# Describes at what frequency (measured in minutes) should application try to fetch config from CBS
collector.dynamic.config.update.frequency=5
diff --git a/tests/dcaegen2/testcases/resources/dcae_properties.robot b/tests/dcaegen2/testcases/resources/dcae_properties.robot
index 961bb46d..e9626411 100644
--- a/tests/dcaegen2/testcases/resources/dcae_properties.robot
+++ b/tests/dcaegen2/testcases/resources/dcae_properties.robot
@@ -30,6 +30,7 @@ ${VES_THROTTLE_STATE_EVENT_PATH} /eventListener/v5/clientThrottlingState
${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_VALID_JSON_V7_STND_DEF_FIELDS} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves7_valid_eventWithStndDefinedFields.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