aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/dcaegen2/prh-testcases/prh_tests.robot4
-rw-r--r--tests/dcaegen2/prh-testcases/prh_tests_with_no_auth.robot20
-rw-r--r--tests/dcaegen2/prh-testcases/resources/prh_configs/prh-no-auth-config.json58
-rw-r--r--tests/dcaegen2/prh-testcases/resources/simulator/AAI.py1
-rw-r--r--tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py1
5 files changed, 82 insertions, 2 deletions
diff --git a/tests/dcaegen2/prh-testcases/prh_tests.robot b/tests/dcaegen2/prh-testcases/prh_tests.robot
index 2491bd1b..69ce27dc 100644
--- a/tests/dcaegen2/prh-testcases/prh_tests.robot
+++ b/tests/dcaegen2/prh-testcases/prh_tests.robot
@@ -1,13 +1,13 @@
*** Settings ***
Documentation Integration tests for PRH.
... PRH receive events from DMaaP and produce or not PNF_READY notification depends on required fields in received event.
-Suite Setup Run keywords Create Headers AND Create sessions
+Suite Setup Run keywords Create Headers AND Create sessions AND Set default PRH CBS config
Test Teardown Reset Simulators
Test Timeout 2 minutes
-Library resources/PrhLibrary.py
Resource resources/prh_sessions.robot
Resource resources/prh_library.robot
+Resource resources/prh_config_library.robot
*** Variables ***
${TEST_CASES_DIR} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets
diff --git a/tests/dcaegen2/prh-testcases/prh_tests_with_no_auth.robot b/tests/dcaegen2/prh-testcases/prh_tests_with_no_auth.robot
new file mode 100644
index 00000000..afcd0f8a
--- /dev/null
+++ b/tests/dcaegen2/prh-testcases/prh_tests_with_no_auth.robot
@@ -0,0 +1,20 @@
+*** Settings ***
+Documentation Integration tests for PRH when cert auth for dmaap and aai is disabled.
+Suite Setup Run keywords Create Headers AND Create sessions AND
+... Set PRH CBS config from file ${CONFIGS_DIR}/prh-no-auth-config.json
+Test Teardown Reset Simulators
+Test Timeout 2 minutes
+
+Resource resources/prh_sessions.robot
+Resource resources/prh_library.robot
+Resource resources/prh_config_library.robot
+
+*** Variables ***
+${TEST_CASES_DIR} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets
+
+*** Test Cases ***
+Simple registration event
+ [Documentation] simple registration scenario when AAI and dmaap cert atuh is disabled
+ [Tags] PRH Valid event
+ [Template] Verify PNF ready sent
+ ${TEST_CASES_DIR}/ves-event-without-additional-fields \ No newline at end of file
diff --git a/tests/dcaegen2/prh-testcases/resources/prh_configs/prh-no-auth-config.json b/tests/dcaegen2/prh-testcases/resources/prh_configs/prh-no-auth-config.json
new file mode 100644
index 00000000..a4f87e05
--- /dev/null
+++ b/tests/dcaegen2/prh-testcases/resources/prh_configs/prh-no-auth-config.json
@@ -0,0 +1,58 @@
+{
+ "cbs.updates-interval": 0,
+ "logging.level.org.onap.dcaegen2.services.prh": "debug",
+ "logging.level.org.onap.dcaegen2.services.sdk": "debug",
+ "logging.level.org.onap.dcaegen2.services.prh.controllers.AppInfoController": "off",
+ "dmaap.dmaapConsumerConfiguration.dmaapUserName": "admin",
+ "dmaap.dmaapConsumerConfiguration.dmaapUserPassword": "admin",
+ "dmaap.dmaapConsumerConfiguration.dmaapContentType": "application/json",
+ "dmaap.dmaapConsumerConfiguration.consumerId": "c12",
+ "dmaap.dmaapConsumerConfiguration.consumerGroup": "OpenDCAE-c12",
+ "dmaap.dmaapConsumerConfiguration.timeoutMs": -1,
+ "dmaap.dmaapProducerConfiguration.dmaapUserName": "admin",
+ "dmaap.dmaapProducerConfiguration.dmaapUserPassword": "admin",
+ "dmaap.dmaapProducerConfiguration.dmaapContentType": "application/json",
+ "dmaap.dmaapUpdateProducerConfiguration.dmaapUserName": "admin",
+ "dmaap.dmaapUpdateProducerConfiguration.dmaapUserPassword": "admin",
+ "dmaap.dmaapUpdateProducerConfiguration.dmaapContentType": "application/json",
+ "aai.aaiClientConfiguration.pnfUrl": "http://aai:3333/aai/v12/network/pnfs/pnf",
+ "aai.aaiClientConfiguration.aaiUserName": "DCAE",
+ "aai.aaiClientConfiguration.aaiUserPassword": "DCAE",
+ "aai.aaiClientConfiguration.aaiIgnoreSslCertificateErrors": true,
+ "aai.aaiClientConfiguration.aaiServiceInstancePath": "/business/customers/customer/${customer}/service-subscriptions/service-subscription/${serviceType}/service-instances/service-instance/${serviceInstanceId}",
+ "aai.aaiClientConfiguration.aaiHeaders": {
+ "X-FromAppId": "prh",
+ "X-TransactionId": "9999",
+ "Accept": "application/json",
+ "Real-Time": "true",
+ "Authorization": "Basic QUFJOkFBSQ=="
+ },
+ "security.trustStorePath": "",
+ "security.trustStorePasswordPath": "",
+ "security.keyStorePath": "",
+ "security.keyStorePasswordPath": "",
+ "security.enableAaiCertAuth": false,
+ "security.enableDmaapCertAuth": false,
+ "streams_publishes": {
+ "pnf-update": {
+ "type": "message_router",
+ "dmaap_info": {
+ "topic_url": "http://dmaap-mr:2222/events/unauthenticated.PNF_UPDATE"
+ }
+ },
+ "pnf-ready": {
+ "type": "message_router",
+ "dmaap_info": {
+ "topic_url": "http://dmaap-mr:2222/events/unauthenticated.PNF_READY"
+ }
+ }
+ },
+ "streams_subscribes": {
+ "ves-reg-output": {
+ "type": "message_router",
+ "dmaap_info": {
+ "topic_url": "http://dmaap-mr:2222/events/unauthenticated.VES_PNFREG_OUTPUT"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py b/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py
index 43f4fab5..0886434e 100644
--- a/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py
+++ b/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py
@@ -191,6 +191,7 @@ class AAIHandler(BaseHTTPRequestHandler):
def _main_(handler_class=AAIHandler, protocol="HTTP/1.0"):
handler_class.protocol_version = protocol
+ httpServerLib.start_http_endpoint(3333, AAIHandler)
httpServerLib.start_https_endpoint(3334, AAIHandler, keyfile="certs/aai.key", certfile="certs/aai.crt", ca_certs="certs/root.crt")
httpServerLib.start_http_endpoint(3335, AAISetup)
while 1:
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py b/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py
index 5ec601f6..5d7bd707 100644
--- a/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py
+++ b/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py
@@ -125,6 +125,7 @@ class DMaaPHandler(BaseHTTPRequestHandler):
def _main_(handler_class=DMaaPHandler, protocol="HTTP/1.0"):
handler_class.protocol_version = protocol
+ httpServerLib.start_http_endpoint(2222, DMaaPHandler)
httpServerLib.start_https_endpoint(2223, DMaaPHandler, keyfile="certs/dmaap-mr.key", certfile="certs/dmaap-mr.crt", ca_certs="certs/root.crt")
httpServerLib.start_http_endpoint(2224, DmaapSetup)
while 1: