aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/authorization.robot
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2018-09-12 14:28:28 +0000
committerGerrit Code Review <gerrit@onap.org>2018-09-12 14:28:28 +0000
commit26376318a403c8b2f6b046808ed7a20f288306e9 (patch)
tree63754aeb8d940860c4db0cd64f776f6c1e164589 /test/csit/tests/dcaegen2-collectors-hv-ves/testcases/authorization.robot
parent879999a1f7ff527a097574040755e083ea55f298 (diff)
parent86ef3959eae52f0b15c260a0d4fd92c1b522d53f (diff)
Merge "Write CSIT test case for unencrypted connection"
Diffstat (limited to 'test/csit/tests/dcaegen2-collectors-hv-ves/testcases/authorization.robot')
-rw-r--r--test/csit/tests/dcaegen2-collectors-hv-ves/testcases/authorization.robot35
1 files changed, 31 insertions, 4 deletions
diff --git a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/authorization.robot b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/authorization.robot
index 1b832f27d..15c1c4896 100644
--- a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/authorization.robot
+++ b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/authorization.robot
@@ -11,21 +11,47 @@ Test Teardown VES-HV Collector Test Shutdown
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}
+ ${XNF_WITH_INVALID_CERTIFICATES}= Configure xNF Simulators ${XNF_PORTS_LIST}
+ ... should_use_valid_certs=${false}
+ Set Suite Variable ${XNF_WITH_INVALID_CERTIFICATES}
+ ${XNF_PORTS_LIST}= Create List 7001
+ ${XNF_WITHOUT_SSL}= Configure xNF Simulators ${XNF_PORTS_LIST}
+ ... should_disable_ssl=${true}
+ Set Suite Variable ${XNF_WITHOUT_SSL}
+ ${XNF_PORTS_LIST}= Create List 7002
+ ${XNF_WITHOUT_SSL_CONNECTING_TO_UNENCRYPTED_HV_VES}= Configure xNF Simulators ${XNF_PORTS_LIST}
+ ... should_disable_ssl=${true}
+ ... should_connect_to_unencrypted_hv_ves=${true}
+ Set Suite Variable ${XNF_WITHOUT_SSL_CONNECTING_TO_UNENCRYPTED_HV_VES}
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}
+ Send Messages From xNF Simulators ${XNF_WITH_INVALID_CERTIFICATES} ${XNF_VALID_MESSAGES_REQUEST}
+
+ Wait until keyword succeeds 60 sec 5 sec
+ ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_0}
+
+Unencrypted connection from client
+ [Documentation] VES-HV Collector should not authorize XNF trying to connect through unencrypted connection
+
+ Send Messages From xNF Simulators ${XNF_WITHOUT_SSL} ${XNF_VALID_MESSAGES_REQUEST}
Wait until keyword succeeds 60 sec 5 sec
... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_0}
+Unencrypted connection on both ends
+ [Documentation] When run without SSL turned on, VES-HV Collector should route all valid messages
+ ... from xNF trying to connect through unencrypted connection
+
+ Send Messages From xNF Simulators ${XNF_WITHOUT_SSL_CONNECTING_TO_UNENCRYPTED_HV_VES} ${XNF_VALID_MESSAGES_REQUEST}
+
+ Wait until keyword succeeds 60 sec 5 sec
+ ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_5000}
+
*** Variables ***
${VES_HV_SCENARIOS} %{WORKSPACE}/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios
@@ -33,3 +59,4 @@ ${VES_HV_SCENARIOS} %{WORKSPACE}/test/csit/tests/dcae
${XNF_VALID_MESSAGES_REQUEST} ${VES_HV_SCENARIOS}/authorization/xnf-valid-messages-request.json
${AMOUNT_0} 0
+${AMOUNT_5000} 5000