summaryrefslogtreecommitdiffstats
path: root/test/csit
diff options
context:
space:
mode:
Diffstat (limited to 'test/csit')
-rw-r--r--test/csit/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot1
-rw-r--r--test/csit/tests/dcaegen2-collectors-hv-ves/testcases/authorization.robot35
-rw-r--r--test/csit/tests/dcaegen2-collectors-hv-ves/testcases/multiple-clients.robot4
-rw-r--r--test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/common-keywords.robot22
-rw-r--r--test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/authorization/xnf-valid-messages-request.json23
5 files changed, 77 insertions, 8 deletions
diff --git a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot
index 32e920b39..c0a96dbc4 100644
--- a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot
+++ b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot
@@ -17,7 +17,6 @@ Configure collector
${CONSUL_API_ACCESS}= Get Consul Api Access Url ${HTTP_METHOD_URL} ${CONSUL_CONTAINER_HOST} ${CONSUL_CONTAINER_PORT}
${CONSUL_API_URL}= Catenate SEPARATOR= ${CONSUL_API_ACCESS} ${CONSUL_VES_HV_CONFIGURATION_KEY_PATH}
Publish HV VES Configuration In Consul ${CONSUL_API_URL} ${VES_HV_CONFIGURATION_JSON_FILEPATH}
- Sleep 5
Configure Dcae App
${DCAE_APP_API_ACCESS}= Get Dcae App Api Access Url ${HTTP_METHOD_URL} ${DCAE_APP_CONTAINER_HOST} ${DCAE_APP_CONTAINER_PORT}
diff --git a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/authorization.robot b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/authorization.robot
new file mode 100644
index 000000000..1b832f27d
--- /dev/null
+++ b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/authorization.robot
@@ -0,0 +1,35 @@
+*** Settings ***
+Library DcaeAppSimulatorLibrary
+
+Resource resources/common-keywords.robot
+
+Suite Setup Client Authorization Suite Setup
+Suite Teardown VES-HV Collector Suite Teardown
+Test Teardown VES-HV Collector Test Shutdown
+
+*** Keywords ***
+Client Authorization Suite Setup
+ Log Started Suite: VES-HV Client Authorization
+ ${XNF_PORTS_LIST}= Create List 7000
+ Configure Invalid xNF Simulators On Ports ${XNF_PORTS_LIST}
+ Log Suite setup finished
+
+
+*** Test Cases ***
+Authorization
+ [Documentation] VES-HV Collector should not authorize XNF with invalid certificate and not route any message
+ ... to topics
+
+ ${SIMULATORS_LIST}= Get Invalid xNF Simulators 1
+ Send Messages From xNF Simulators ${SIMULATORS_LIST} ${XNF_VALID_MESSAGES_REQUEST}
+
+ Wait until keyword succeeds 60 sec 5 sec
+ ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_0}
+
+
+*** Variables ***
+${VES_HV_SCENARIOS} %{WORKSPACE}/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios
+
+${XNF_VALID_MESSAGES_REQUEST} ${VES_HV_SCENARIOS}/authorization/xnf-valid-messages-request.json
+
+${AMOUNT_0} 0
diff --git a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/multiple-clients.robot b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/multiple-clients.robot
index bac85394f..862a2bc6a 100644
--- a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/multiple-clients.robot
+++ b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/multiple-clients.robot
@@ -11,14 +11,14 @@ Test Teardown VES-HV Collector Test Shutdown
Multiple Clients Handling Suite Setup
Log Started Suite: VES-HV Multiple Clients Handling
${XNF_PORTS_LIST}= Create List 7000 7001 7002
- Configure xNF Simulators On Ports ${XNF_PORTS_LIST}
+ Configure Valid xNF Simulators On Ports ${XNF_PORTS_LIST}
Log Suite setup finished
*** Test Cases ***
Handle Multiple Connections
[Documentation] VES-HV Collector should handle multiple incoming transmissions
- ${SIMULATORS_LIST}= Get xNF Simulators 3
+ ${SIMULATORS_LIST}= Get Valid xNF Simulators 3
Send Messages From xNF Simulators ${SIMULATORS_LIST} ${XNF_SMALLER_PAYLOAD_REQUEST}
Wait until keyword succeeds 60 sec 5 sec
diff --git a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/common-keywords.robot b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/common-keywords.robot
index af4cd71da..345118657 100644
--- a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/common-keywords.robot
+++ b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/common-keywords.robot
@@ -4,15 +4,27 @@ Library VesHvContainersUtilsLibrary
Library Collections
*** Keywords ***
-Configure xNF Simulators On Ports
+Configure Valid xNF Simulators On Ports
[Arguments] ${XNF_PORTS_LIST}
- ${XNF_SIMULATORS_ADDRESSES}= Start Xnf Simulators ${XNF_PORTS_LIST} True
- Set Suite Variable ${XNF_SIMULATORS_ADDRESSES}
+ ${VALID_XNF_SIMULATORS_ADDRESSES}= Start Xnf Simulators ${XNF_PORTS_LIST} True
+ Set Suite Variable ${VALID_XNF_SIMULATORS_ADDRESSES}
-Get xNF Simulators
+Configure Invalid xNF Simulators On Ports
+ [Arguments] ${XNF_PORTS_LIST}
+ ${INVALID_XNF_SIMULATORS_ADDRESSES}= Start Xnf Simulators ${XNF_PORTS_LIST} False
+ Set Suite Variable ${INVALID_XNF_SIMULATORS_ADDRESSES}
+
+
+Get Valid xNF Simulators
+ [Arguments] ${AMOUNT}
+ ${SIMULATORS}= Get Slice From List ${VALID_XNF_SIMULATORS_ADDRESSES} 0 ${AMOUNT}
+ [Return] ${SIMULATORS}
+
+
+Get Invalid xNF Simulators
[Arguments] ${AMOUNT}
- ${SIMULATORS}= Get Slice From List ${XNF_SIMULATORS_ADDRESSES} 0 ${AMOUNT}
+ ${SIMULATORS}= Get Slice From List ${INVALID_XNF_SIMULATORS_ADDRESSES} 0 ${AMOUNT}
[Return] ${SIMULATORS}
diff --git a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/authorization/xnf-valid-messages-request.json b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/authorization/xnf-valid-messages-request.json
new file mode 100644
index 000000000..c71793d7d
--- /dev/null
+++ b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/authorization/xnf-valid-messages-request.json
@@ -0,0 +1,23 @@
+[
+ {
+ "commonEventHeader": {
+ "version": "sample-version",
+ "domain": "HVRANMEAS",
+ "sequence": 1,
+ "priority": 1,
+ "eventId": "sample-event-id",
+ "eventName": "sample-event-name",
+ "eventType": "sample-event-type",
+ "startEpochMicrosec": 120034455,
+ "lastEpochMicrosec": 120034455,
+ "nfNamingCode": "sample-nf-naming-code",
+ "nfcNamingCode": "sample-nfc-naming-code",
+ "reportingEntityId": "sample-reporting-entity-id",
+ "reportingEntityName": "sample-reporting-entity-name",
+ "sourceId": "sample-source-id",
+ "sourceName": "sample-source-name"
+ },
+ "messageType": "VALID",
+ "messagesAmount": 500000
+ }
+] \ No newline at end of file