aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plans/dcaegen2-collectors-hv-ves/testsuites/collector/configuration/secure.json4
-rw-r--r--plans/dcaegen2-collectors-hv-ves/testsuites/collector/ssl/.gitignore1
-rwxr-xr-xplans/dcaegen2-collectors-hv-ves/testsuites/collector/ssl/gen-certs.sh6
-rw-r--r--plans/usecases/5G-bulkpm/setup.sh43
-rw-r--r--plans/usecases/5G-bulkpm/teardown.sh3
-rw-r--r--tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot25
-rw-r--r--tests/dcaegen2-collectors-hv-ves/testcases/authorization.robot8
-rw-r--r--tests/dcaegen2-collectors-hv-ves/testcases/libraries/DcaeAppSimulatorLibrary.py50
-rw-r--r--tests/dcaegen2-collectors-hv-ves/testcases/libraries/XnfSimulatorLibrary.py7
-rw-r--r--tests/dcaegen2-collectors-hv-ves/testcases/message-routing.robot20
-rw-r--r--tests/dcaegen2-collectors-hv-ves/testcases/multiple-clients.robot6
-rw-r--r--tests/dcaegen2-collectors-hv-ves/testcases/resources/common-keywords.robot2
-rw-r--r--tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot61
-rw-r--r--tests/dcaegen2/prh-testcases/resources/docker-compose.yml2
14 files changed, 140 insertions, 98 deletions
diff --git a/plans/dcaegen2-collectors-hv-ves/testsuites/collector/configuration/secure.json b/plans/dcaegen2-collectors-hv-ves/testsuites/collector/configuration/secure.json
index 2c2610a0..018f590a 100644
--- a/plans/dcaegen2-collectors-hv-ves/testsuites/collector/configuration/secure.json
+++ b/plans/dcaegen2-collectors-hv-ves/testsuites/collector/configuration/secure.json
@@ -6,7 +6,7 @@
"cbs.firstRequestDelaySec": 3,
"cbs.requestIntervalSec": 5,
"security.keys.keyStoreFile": "/etc/hv-ves/ssl/server.p12",
- "security.keys.keyStorePassword": "onaponap",
+ "security.keys.keyStorePasswordFile": "/etc/hv-ves/ssl/server.pass",
"security.keys.trustStoreFile": "/etc/hv-ves/ssl/trust.p12",
- "security.keys.trustStorePassword": "onaponap"
+ "security.keys.trustStorePasswordFile": "/etc/hv-ves/ssl/trust.pass"
} \ No newline at end of file
diff --git a/plans/dcaegen2-collectors-hv-ves/testsuites/collector/ssl/.gitignore b/plans/dcaegen2-collectors-hv-ves/testsuites/collector/ssl/.gitignore
index 0729569c..955c17d1 100644
--- a/plans/dcaegen2-collectors-hv-ves/testsuites/collector/ssl/.gitignore
+++ b/plans/dcaegen2-collectors-hv-ves/testsuites/collector/ssl/.gitignore
@@ -4,3 +4,4 @@
*.csr
*.pkcs12
*.p12
+*.pass
diff --git a/plans/dcaegen2-collectors-hv-ves/testsuites/collector/ssl/gen-certs.sh b/plans/dcaegen2-collectors-hv-ves/testsuites/collector/ssl/gen-certs.sh
index 9f6bea20..33e3b32b 100755
--- a/plans/dcaegen2-collectors-hv-ves/testsuites/collector/ssl/gen-certs.sh
+++ b/plans/dcaegen2-collectors-hv-ves/testsuites/collector/ssl/gen-certs.sh
@@ -41,6 +41,8 @@ function gen_key() {
keytool -certreq -alias ${key_name} -keyalg RSA ${keystore} | \
keytool -alias ${ca} -gencert -ext "san=dns:${CN_PREFIX}-${ca}" ${store_opts} -keystore ${ca}.p12 | \
keytool -alias ${key_name} -importcert ${keystore}
+
+ printf ${STORE_PASS} > ${key_name}.pass
}
@@ -54,10 +56,11 @@ function gen_truststore() {
local name="$1"
local trusted_ca="$2"
keytool -import -trustcacerts -alias ca -file ${trusted_ca}.crt ${store_opts} -keystore ${name}.p12
+ printf ${STORE_PASS} > ${name}.pass
}
function clean() {
- rm -f *.crt *.p12
+ rm -f *.crt *.p12 *.pass
}
if [[ $# -eq 0 ]]; then
@@ -74,4 +77,3 @@ else
echo "usage: $0 [clean]"
exit 1
fi
-
diff --git a/plans/usecases/5G-bulkpm/setup.sh b/plans/usecases/5G-bulkpm/setup.sh
index 5d99b1c1..265ec96c 100644
--- a/plans/usecases/5G-bulkpm/setup.sh
+++ b/plans/usecases/5G-bulkpm/setup.sh
@@ -170,9 +170,6 @@ for i in {1..10}; do
done
sleep 10
-#Pass any variables required by Robot test suites in ROBOT_VARIABLES
-ROBOT_VARIABLES="-v DR_PROV_IP:${DR_PROV_IP} -v DR_NODE_IP:${DR_NODE_IP} -v DMAAP_MR_IP:${DMAAP_MR_IP} -v VESC_IP:${VESC_IP} -v VESC_PORT:${VESC_PORT} -v DR_SUBSCIBER_IP:${DR_SUBSCIBER_IP} -v SFTP_IP:${SFTP_IP}"
-
pip install jsonschema uuid simplejson
# Wait container ready
sleep 2
@@ -192,6 +189,46 @@ curl -v -X POST -H "Content-Type:application/vnd.dmaap-dr.subscription" -H "X-DM
sleep 10
curl -k https://$DR_PROV_IP:8443/internal/prov
+# Consul Configuration for PM Mapper
+cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/cbs.json /tmp/cbs.json
+sed -i 's/ipaddress/'${CBS_IP}'/g' /tmp/cbs.json
+curl --request PUT --data @/tmp/cbs.json http://$CONSUL_IP:8500/v1/agent/service/register
+curl 'http://'$CONSUL_IP':8500/v1/kv/pmmapper?dc=dc1' -X PUT -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' --data @$WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/config.json
+
+# PM Mapper startup and configuration
+mkdir /tmp/docker-compose
+cd /tmp/docker-compose
+cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-pmmapper.yml /tmp/docker-compose/docker-compose.yml
+CBS_IP=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' cbs)
+sed -i 's/CBSIP/'$CBS_IP'/g' docker-compose.yml
+sed -i 's/1.1.1.1/'$DR_NODE_IP'/g' docker-compose.yml
+sed -i 's/4.4.4.4/'$DMAAP_MR_IP'/g' docker-compose.yml
+docker-compose up -d
+
+# Setting up PM Mapper certs.
+docker cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/cert.jks.b64 pmmapper:opt/app/pm-mapper/etc/
+docker cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/jks.pass pmmapper:opt/app/pm-mapper/etc/
+docker cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/trust.jks.b64 pmmapper:opt/app/pm-mapper/etc/
+docker cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/trust.pass pmmapper:opt/app/pm-mapper/etc/
+docker restart pmmapper
+
+# Create PM Mapper feed and create PM Mapper subscriber on data router
+curl -v -X POST -H "Content-Type:application/vnd.dmaap-dr.feed" -H "X-DMAAP-DR-ON-BEHALF-OF:pmmapper" --data-ascii @$WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/createFeed.json --post301 --location-trusted -k https://${DR_PROV_IP}:8443
+curl -v -X POST -H "Content-Type:application/vnd.dmaap-dr.subscription" -H "X-DMAAP-DR-ON-BEHALF-OF:pmmapper" --data-ascii @$WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/addSubscriber.json --post301 --location-trusted -k https://${DR_PROV_IP}:8443/subscribe/1
+
+# Create PM Mapper tocic in Message Router
+curl -v -X POST http://${DMAAP_MR_IP}:3904/topics/create -d @$WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/createTopic.json -H "Content-Type: application/json"
+PMMAPPER_IP=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' pmmapper)
+docker exec pmmapper /bin/sh -c "cat /var/log/ONAP/dcaegen2/services/pm-mapper/pm-mapper_output.log" > /tmp/pmmapper.log
+cat /tmp/pmmapper.log
+docker exec -it datarouter-prov sh -c "curl http://dmaap-dr-node:8080/internal/fetchProv"
+sleep 10
+curl -k https://$DR_PROV_IP:8443/internal/prov
+curl http://${DMAAP_MR_IP}:3904/events/PM_MAPPER/CG1/C1?timeout=1000
+
+#Pass any variables required by Robot test suites in ROBOT_VARIABLES
+ROBOT_VARIABLES="-v DR_PROV_IP:${DR_PROV_IP} -v DR_NODE_IP:${DR_NODE_IP} -v DMAAP_MR_IP:${DMAAP_MR_IP} -v VESC_IP:${VESC_IP} -v VESC_PORT:${VESC_PORT} -v DR_SUBSCIBER_IP:${DR_SUBSCIBER_IP} -v SFTP_IP:${SFTP_IP}"
+
else
############################################################
############################################################
diff --git a/plans/usecases/5G-bulkpm/teardown.sh b/plans/usecases/5G-bulkpm/teardown.sh
index 78de7594..5b3d1710 100644
--- a/plans/usecases/5G-bulkpm/teardown.sh
+++ b/plans/usecases/5G-bulkpm/teardown.sh
@@ -15,4 +15,5 @@ kill-instance.sh mariadb
kill-instance.sh dfc
kill-instance.sh sftp
kill-instance.sh cbs
-kill-instance.sh consul \ No newline at end of file
+kill-instance.sh consul
+kill-instance.sh pmmapper \ No newline at end of file
diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot b/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot
index 1e574b0e..7fffd9c3 100644
--- a/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot
+++ b/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot
@@ -37,20 +37,9 @@ Configure collector
Publish HV VES Configuration In Consul ${CONSUL_API_URL} ${HV_VES_CONFIGURATION_JSON_FILEPATH}
Configure Dcae App
- ${DCAE_APP_API_ACCESS}= Get Dcae App Api Access Url ${HTTP_METHOD_URL} ${DCAE_APP_CONTAINER_HOST} ${DCAE_APP_CONTAINER_PORT}
-
- ${DCAE_APP_API_MESSAGE_RESET_URL}= Catenate SEPARATOR= ${DCAE_APP_API_ACCESS} ${DCAE_APP_API_MESSAGES_RESET_PATH}
- Set Suite Variable ${DCAE_APP_API_MESSAGE_RESET_URL} children=True
-
- ${DCAE_APP_API_MESSAGES_COUNT_URL}= Catenate SEPARATOR= ${DCAE_APP_API_ACCESS} ${DCAE_APP_API_MESSAGES_COUNT_PATH}
- Set Suite Variable ${DCAE_APP_API_MESSAGES_COUNT_URL} children=True
-
- ${DCAE_APP_API_MESSAGES_VALIDATION_URL}= Catenate SEPARATOR= ${DCAE_APP_API_ACCESS} ${DCAE_APP_API_MESSAGES_VALIDATION_PATH}
- Set Suite Variable ${DCAE_APP_API_MESSAGES_VALIDATION_URL} children=True
-
- ${DCAE_APP_API_TOPIC_CONFIGURATION_URL}= Catenate SEPARATOR= ${DCAE_APP_API_ACCESS} ${DCAE_APP_API_TOPIC_CONFIGURATION_PATH}
Wait until keyword succeeds 10 sec 5 sec
- ... Configure Dcae App Simulator To Consume Messages From Topics ${DCAE_APP_API_TOPIC_CONFIGURATION_URL} ${ROUTED_MESSAGES_TOPIC}
+ ... Configure Dcae App Simulator To Consume Messages From Topics ${DEFAULT_PERF3GPP_TOPIC}
+ Set Suite Variable ${DEFAULT_PERF3GPP_TOPIC} children=True
*** Variables ***
@@ -60,15 +49,7 @@ ${CONSUL_CONTAINER_HOST} consul-server
${CONSUL_CONTAINER_PORT} 8500
${CONSUL_HV_VES_CONFIGURATION_KEY_PATH} /v1/kv/dcae-hv-ves-collector
-${DCAE_APP_CONTAINER_HOST} dcae-app-simulator
-${DCAE_APP_CONTAINER_PORT} 6063
-${DCAE_APP_API_TOPIC_CONFIGURATION_PATH} /configuration/topics
-${DCAE_APP_API_MESSAGES_RESET_PATH} /messages
-${DCAE_APP_API_MESSAGES_PATH} /messages/all
-${DCAE_APP_API_MESSAGES_COUNT_PATH} ${DCAE_APP_API_MESSAGES_PATH}/count
-${DCAE_APP_API_MESSAGES_VALIDATION_PATH} ${DCAE_APP_API_MESSAGES_PATH}/validate
-
-${ROUTED_MESSAGES_TOPIC} TEST_HV_VES_PERF3GPP
+${DEFAULT_PERF3GPP_TOPIC} TEST_HV_VES_PERF3GPP
${HV_VES_RESOURCES} %{WORKSPACE}/tests/dcaegen2-collectors-hv-ves/testcases/resources
${HV_VES_CONFIGURATION_JSON_FILEPATH} ${HV_VES_RESOURCES}/hv-ves-configuration.json
diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/authorization.robot b/tests/dcaegen2-collectors-hv-ves/testcases/authorization.robot
index 4d13a6bf..537cb8c1 100644
--- a/tests/dcaegen2-collectors-hv-ves/testcases/authorization.robot
+++ b/tests/dcaegen2-collectors-hv-ves/testcases/authorization.robot
@@ -1,7 +1,7 @@
# ============LICENSE_START=======================================================
# csit-dcaegen2-collectors-hv-ves
# ================================================================================
-# Copyright (C) 2018 NOKIA
+# Copyright (C) 2018-2019 NOKIA
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -51,7 +51,7 @@ Authorization
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}
+ ... Assert Dcae App Consumed ${DEFAULT_PERF3GPP_TOPIC} ${AMOUNT_0}
Unencrypted connection from client
[Documentation] VES-HV Collector should not authorize XNF trying to connect through unencrypted connection
@@ -59,7 +59,7 @@ Unencrypted connection from client
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}
+ ... Assert Dcae App Consumed ${DEFAULT_PERF3GPP_TOPIC} ${AMOUNT_0}
Unencrypted connection on both ends
[Documentation] When run without SSL turned on, VES-HV Collector should route all valid messages
@@ -68,7 +68,7 @@ Unencrypted connection on both ends
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}
+ ... Assert Dcae App Consumed ${DEFAULT_PERF3GPP_TOPIC} ${AMOUNT_5000}
*** Variables ***
diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/libraries/DcaeAppSimulatorLibrary.py b/tests/dcaegen2-collectors-hv-ves/testcases/libraries/DcaeAppSimulatorLibrary.py
index dd41c6a3..60c2c46d 100644
--- a/tests/dcaegen2-collectors-hv-ves/testcases/libraries/DcaeAppSimulatorLibrary.py
+++ b/tests/dcaegen2-collectors-hv-ves/testcases/libraries/DcaeAppSimulatorLibrary.py
@@ -1,7 +1,7 @@
# ============LICENSE_START=======================================================
# csit-dcaegen2-collectors-hv-ves
# ================================================================================
-# Copyright (C) 2018 NOKIA
+# Copyright (C) 2018-2019 NOKIA
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -16,19 +16,37 @@
# limitations under the License.
# ============LICENSE_END=========================================================
import HttpRequests
+from VesHvContainersUtilsLibrary import VesHvContainersUtilsLibrary
from robot.api import logger
+import json
-DCAE_APP_NAME = "DCAE App"
+DCAE_APP_NAME = "DCAE App Simulator"
+
+DCAE_APP_HOST = "dcae-app-simulator"
+DCAE_APP_PORT = "6063"
+DCAE_APP_ADDRESS = VesHvContainersUtilsLibrary().get_dcae_app_api_access_url("http://", DCAE_APP_HOST, DCAE_APP_PORT)
+
+TOPIC_CONFIGURATION_PATH = DCAE_APP_ADDRESS + "/configuration/topics"
+
+MESSAGES_PATH = "/messages/%s"
+MESSAGES_RESET_PATH = DCAE_APP_ADDRESS + MESSAGES_PATH
+MESSAGES_COUNT_PATH = DCAE_APP_ADDRESS + MESSAGES_PATH + "/count"
+MESSAGES_VALIDATION_PATH = DCAE_APP_ADDRESS + MESSAGES_PATH + "/validate"
class DcaeAppSimulatorLibrary:
- def configure_dcae_app_simulator_to_consume_messages_from_topics(self, app_url, topics):
- logger.info("PUT at: " + app_url)
- resp = HttpRequests.session_without_env().put(app_url, data={'topics': topics}, timeout=10)
+ def configure_dcae_app_simulator_to_consume_messages_from_topics(self, topics):
+ app_url = TOPIC_CONFIGURATION_PATH
+ logger.info("PUT " + str(topics) + " at: " + app_url)
+ resp = HttpRequests.session_without_env().put(app_url, data=self.not_escaped(topics), timeout=10)
HttpRequests.checkStatusCode(resp.status_code, DCAE_APP_NAME)
- def assert_DCAE_app_consumed(self, app_url, expected_messages_amount):
+ def not_escaped(self, data):
+ return json.dumps(data)
+
+ def assert_DCAE_app_consumed(self, topic, expected_messages_amount):
+ app_url = MESSAGES_COUNT_PATH % topic
logger.info("GET at: " + app_url)
resp = HttpRequests.session_without_env().get(app_url, timeout=10)
HttpRequests.checkStatusCode(resp.status_code, DCAE_APP_NAME)
@@ -36,28 +54,18 @@ class DcaeAppSimulatorLibrary:
assert int(resp.content) == int(expected_messages_amount), \
"Messages consumed by simulator: " + str(resp.content) + " expecting: " + str(expected_messages_amount)
- def assert_DCAE_app_consumed_less_equal_than(self, app_url, messages_threshold):
- logger.info("GET at: " + app_url)
- resp = HttpRequests.session_without_env().get(app_url, timeout=10)
- HttpRequests.checkStatusCode(resp.status_code, DCAE_APP_NAME)
-
- logger.debug("Messages consumed by simulator: " + resp.content +
- " expecting more than 0 and less/equal than " + messages_threshold)
-
- assert 0 < int(resp.content) <= int(messages_threshold), \
- "Messages consumed by simulator: " + str(resp.content) + \
- " expecting more than 0 and less/equal than " + str(messages_threshold)
-
- def reset_DCAE_app_simulator(self, app_url):
+ def reset_DCAE_app_simulator(self, topic):
+ app_url = MESSAGES_RESET_PATH % topic
logger.info("DELETE at: " + app_url)
resp = HttpRequests.session_without_env().delete(app_url, timeout=10)
HttpRequests.checkStatusCode(resp.status_code, DCAE_APP_NAME)
- def assert_DCAE_app_consumed_proper_messages(self, app_url, message_filepath):
- logger.info("POST at: " + app_url)
+ def assert_DCAE_app_consumed_proper_messages(self, topic, message_filepath):
+ app_url = MESSAGES_VALIDATION_PATH % topic
file = open(message_filepath, "rb")
data = file.read()
file.close()
+ logger.info("POST " + str(data) + "at: " + app_url)
resp = HttpRequests.session_without_env().post(app_url, data=data, timeout=10)
HttpRequests.checkStatusCode(resp.status_code, DCAE_APP_NAME)
diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/libraries/XnfSimulatorLibrary.py b/tests/dcaegen2-collectors-hv-ves/testcases/libraries/XnfSimulatorLibrary.py
index 789c0b69..ea225c53 100644
--- a/tests/dcaegen2-collectors-hv-ves/testcases/libraries/XnfSimulatorLibrary.py
+++ b/tests/dcaegen2-collectors-hv-ves/testcases/libraries/XnfSimulatorLibrary.py
@@ -158,8 +158,9 @@ class XnfSimulator:
cert_name_prefix = "" if should_use_valid_certs else "untrusted"
certificates_path_with_file_prefix = COLLECTOR_CERTS_LOOKUP_DIR + cert_name_prefix
self.key_store_path = certificates_path_with_file_prefix + "client.p12"
+ self.key_store_passwd_path = certificates_path_with_file_prefix + "client.pass"
self.trust_store_path = certificates_path_with_file_prefix + "trust.p12"
- self.sec_store_passwd = "onaponap"
+ self.trust_store_passwd_path = certificates_path_with_file_prefix + "trust.pass"
self.disable_ssl = should_disable_ssl
self.hv_collector_host = UNENCRYPTED_HV_VES_SERVICE_NAME \
if should_connect_to_unencrypted_hv_ves else HV_VES_SERVICE_NAME
@@ -171,8 +172,8 @@ class XnfSimulator:
"--ves-port", "6061",
"--key-store", self.key_store_path,
"--trust-store", self.trust_store_path,
- "--key-store-password", self.sec_store_passwd,
- "--trust-store-password", self.sec_store_passwd]
+ "--key-store-password-file", self.key_store_passwd_path,
+ "--trust-store-password-file", self.trust_store_passwd_path]
if self.disable_ssl:
startup_command.append("--ssl-disable")
return startup_command
diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/message-routing.robot b/tests/dcaegen2-collectors-hv-ves/testcases/message-routing.robot
index 985c3793..40923aab 100644
--- a/tests/dcaegen2-collectors-hv-ves/testcases/message-routing.robot
+++ b/tests/dcaegen2-collectors-hv-ves/testcases/message-routing.robot
@@ -42,8 +42,8 @@ Correct Messages Routing
Send Messages From xNF Simulators ${XNF_SIMULATOR} ${XNF_FIXED_PAYLOAD_REQUEST}
Wait until keyword succeeds 60 sec 5 sec
- ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_25000}
- Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_FIXED_PAYLOAD_REQUEST}
+ ... Assert Dcae App Consumed ${DEFAULT_PERF3GPP_TOPIC} ${AMOUNT_25000}
+ Assert Dcae App Consumed Proper Messages ${DEFAULT_PERF3GPP_TOPIC} ${DCAE_FIXED_PAYLOAD_REQUEST}
Too big payload message handling
@@ -52,8 +52,8 @@ Too big payload message handling
Send Messages From xNF Simulators ${XNF_SIMULATOR} ${XNF_TOO_BIG_PAYLOAD_REQUEST}
Wait until keyword succeeds 60 sec 5 sec
- ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_25000}
- Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_TOO_BIG_PAYLOAD_REQUEST}
+ ... Assert Dcae App Consumed ${DEFAULT_PERF3GPP_TOPIC} ${AMOUNT_25000}
+ Assert Dcae App Consumed Proper Messages ${DEFAULT_PERF3GPP_TOPIC} ${DCAE_TOO_BIG_PAYLOAD_REQUEST}
Invalid wire frame message handling
@@ -62,8 +62,8 @@ Invalid wire frame message handling
Send Messages From xNF Simulators ${XNF_SIMULATOR} ${XNF_INVALID_WIRE_FRAME_REQUEST}
Wait until keyword succeeds 60 sec 5 sec
- ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_50000}
- Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_INVALID_WIRE_FRAME_REQUEST}
+ ... Assert Dcae App Consumed ${DEFAULT_PERF3GPP_TOPIC} ${AMOUNT_50000}
+ Assert Dcae App Consumed Proper Messages ${DEFAULT_PERF3GPP_TOPIC} ${DCAE_INVALID_WIRE_FRAME_REQUEST}
Invalid GPB data message handling
@@ -72,8 +72,8 @@ Invalid GPB data message handling
Send Messages From xNF Simulators ${XNF_SIMULATOR} ${XNF_INVALID_GPB_DATA_REQUEST}
Wait until keyword succeeds 60 sec 5 sec
- ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_50000}
- Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_INVALID_GPB_DATA_REQUEST}
+ ... Assert Dcae App Consumed ${DEFAULT_PERF3GPP_TOPIC} ${AMOUNT_50000}
+ Assert Dcae App Consumed Proper Messages ${DEFAULT_PERF3GPP_TOPIC} ${DCAE_INVALID_GPB_DATA_REQUEST}
Unsupported domain message handling
@@ -82,8 +82,8 @@ Unsupported domain message handling
Send Messages From xNF Simulators ${XNF_SIMULATOR} ${XNF_UNSUPPORTED_DOMAIN_REQUEST}
Wait until keyword succeeds 60 sec 5 sec
- ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_50000}
- Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_UNSUPPORTED_DOMAIN_REQUEST}
+ ... Assert Dcae App Consumed ${DEFAULT_PERF3GPP_TOPIC} ${AMOUNT_50000}
+ Assert Dcae App Consumed Proper Messages ${DEFAULT_PERF3GPP_TOPIC} ${DCAE_UNSUPPORTED_DOMAIN_REQUEST}
*** Variables ***
${HTTP_METHOD_URL} http://
diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/multiple-clients.robot b/tests/dcaegen2-collectors-hv-ves/testcases/multiple-clients.robot
index 735a2085..109ec469 100644
--- a/tests/dcaegen2-collectors-hv-ves/testcases/multiple-clients.robot
+++ b/tests/dcaegen2-collectors-hv-ves/testcases/multiple-clients.robot
@@ -1,7 +1,7 @@
# ============LICENSE_START=======================================================
# csit-dcaegen2-collectors-hv-ves
# ================================================================================
-# Copyright (C) 2018 NOKIA
+# Copyright (C) 2018-2019 NOKIA
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -40,8 +40,8 @@ Handle Multiple Connections
Send Messages From xNF Simulators ${SIMULATORS_LIST} ${XNF_SMALLER_PAYLOAD_REQUEST}
Wait until keyword succeeds 60 sec 5 sec
- ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_15000}
- Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_SMALLER_PAYLOAD_REQUEST}
+ ... Assert Dcae App Consumed ${DEFAULT_PERF3GPP_TOPIC} ${AMOUNT_15000}
+ Assert Dcae App Consumed Proper Messages ${DEFAULT_PERF3GPP_TOPIC} ${DCAE_SMALLER_PAYLOAD_REQUEST}
*** Variables ***
diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/common-keywords.robot b/tests/dcaegen2-collectors-hv-ves/testcases/resources/common-keywords.robot
index 07e886a0..ecf2d028 100644
--- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/common-keywords.robot
+++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/common-keywords.robot
@@ -60,7 +60,7 @@ Send Messages From xNF Simulators
VES-HV Collector Test Shutdown
- Reset DCAE App Simulator ${DCAE_APP_API_MESSAGE_RESET_URL}
+ Reset DCAE App Simulator ${DEFAULT_PERF3GPP_TOPIC}
VES-HV Collector Suite Teardown
diff --git a/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot b/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot
index 9bba4817..5315cc3c 100644
--- a/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot
+++ b/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot
@@ -32,8 +32,7 @@ ${CLI_EXEC_PM_FILTER} curl 'http://${CONSUL_IP}:8500/v1/kv/pm
${CLI_RESTART_PMMAPPER} docker restart pmmapper
${CLI_DELETE_SUB1} curl -i -X DELETE -H "Content-Type:application/vnd.dmaap-dr.subscription" -H "X-DMAAP-DR-ON-BEHALF-OF:DGL" -k https://localhost:8443/subs/1
${CLI_DELETE_SUB2} curl -i -X DELETE -H "Content-Type:application/vnd.dmaap-dr.subscription" -H "X-DMAAP-DR-ON-BEHALF-OF:DGL" -k https://localhost:8443/subs/2
-${CLI_MESSAGE_ROUTER_TOPIC} curl http://${DMAAP_MR_IP}:3904/events/PM_MAPPER/CG1/C1?timeout=1000
-${CLI_MR_EVENT_COUNT} curl http://${DMAAP_MR_IP}:3904/events/PM_MAPPER/CG1/C1?timeout=1000 | egrep -o 'measInfoId1|measInfoId2|measInfoId3' > /tmp/mr.log
+${CLI_MESSAGE_ROUTER_TOPIC} curl http://${DMAAP_MR_IP}:3904/events/PM_MAPPER/CG1/C1?timeout=1000 > /tmp/mr.log
${CLI_MR_LOG} cat /tmp/mr.log
*** Test Cases ***
@@ -69,43 +68,55 @@ Verify 3GPP PM Mapper responds appropriately when invalid metadata is provided
VerifyResponse ${resp.content} Malformed Metadata.
CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=2
-Verify 3GPP PM Mapper maps Type-A file and publish 3gpp perf VES evnets to message router
+Verify that PM Mapper logs successful when a file that contains no measdata is provided
[Tags] PM_MAPPER_05
- [Documentation] Verify 3GPP PM Mapper maps Type-A file and publish 3gpp perf VES evnets to message router.
+ [Documentation] Verify that PM Mapper logs successful when a file that contains no measdata is provided
[Timeout] 1 minute
- SendToDatarouter ${TYPE-A_PM_DATA_FILE_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=3
- CheckLog ${CLI_EXEC_CLI_PM_LOG} Successfully published VES events to messagerouter
+ SendToDatarouter ${NO_MEASDATA_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=3
+ CheckLog ${CLI_EXEC_CLI_PM_LOG} MeasData is empty
CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=3
- Sleep 10s
- CheckLog ${CLI_MESSAGE_ROUTER_TOPIC} perf3gpp_gnb-Ericsson_pmMeasResult
-Verify that PM Mapper maps Type-C xml file and publish 3gpp perf VES evnets to message router.
+Verify that PM Mapper throws Event failed validation against schema error when no managed element content is provided
[Tags] PM_MAPPER_06
- [Documentation] Verify that PM Mapper maps Type-C xml file and publish 3gpp perf VES evnets to message router.
+ [Documentation] Verify 3gpp pm mapper responds with an error when no managed element content is provided
[Timeout] 1 minute
- SendToDatarouter ${TYPE-C_PM_DATA_FILE_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=4
- CheckLog ${CLI_EXEC_CLI_PM_LOG} Successfully published VES events to messagerouter
+ SendToDatarouter ${NO_MANAGED_ELEMENT_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=4
+ CheckLog ${CLI_EXEC_CLI_PM_LOG} XML validation failed
CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=4
- Run Process ${CLI_MR_EVENT_COUNT} shell=yes
- CheckLog ${CLI_MR_LOG} measInfoId1
- CheckLog ${CLI_MR_LOG} measInfoId2
- CheckLog ${CLI_MR_LOG} measInfoId3
-Verify that PM Mapper logs successful when a file that contains no measdata is provided
+Verify that PM Mapper maps Type-C xml file and publish 3gpp perf VES evnets to message router
[Tags] PM_MAPPER_07
- [Documentation] Verify that PM Mapper logs successful when a file that contains no measdata is provided
+ [Documentation] Verify that PM Mapper maps Type-C xml file and publish 3gpp perf VES evnets to message router.
[Timeout] 1 minute
- SendToDatarouter ${NO_MEASDATA_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=5
- CheckLog ${CLI_EXEC_CLI_PM_LOG} MeasData is empty
+ SendToDatarouter ${TYPE-C_PM_DATA_FILE_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=5
+ CheckLog ${CLI_EXEC_CLI_PM_LOG} Successfully published VES events to messagerouter
CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=5
+ Run Process ${CLI_MESSAGE_ROUTER_TOPIC} shell=yes
+ CheckLog ${CLI_MR_LOG} measInfoId1
+ CheckLog ${CLI_MR_LOG} measInfoId2
+ CheckLog ${CLI_MR_LOG} measInfoId3
-Verify that PM Mapper throws Event failed validation against schema error when no managed element content is provided
+Verify 3GPP PM Mapper maps Type-A file based on counter filtering and publish 3gpp perf VES evnets to message router
[Tags] PM_MAPPER_08
- [Documentation] Verify 3gpp pm mapper responds with an error when no managed element content is provided
+ [Documentation] Verify 3GPP PM Mapper maps Type-A file and publish 3gpp perf VES evnets to message router.
[Timeout] 1 minute
- SendToDatarouter ${NO_MANAGED_ELEMENT_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=6
- CheckLog ${CLI_EXEC_CLI_PM_LOG} XML validation failed
+ ${cli_cmd_output}= Run Process ${CLI_EXEC_PM_FILTER} shell=yes
+ ${resp}= Get Request mapper_session ${RECONFIGURE_ENDPOINT}
+ Sleep 5s
+ SendToDatarouter ${TYPE-A_PM_DATA_FILE_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=6
+ CheckLog ${CLI_EXEC_CLI_PM_LOG} Successfully published VES events to messagerouter
CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=6
+ Run Process ${CLI_MESSAGE_ROUTER_TOPIC} shell=yes
+ CheckLog ${CLI_MR_LOG} attTCHSeizures
+ CheckLog ${CLI_MR_LOG} 234
+ CheckLog ${CLI_MR_LOG} 890
+ CheckLog ${CLI_MR_LOG} 456
+ CheckLog ${CLI_MR_LOG} succTCHSeizures2
+ CheckLog ${CLI_MR_LOG} 86,87,2,6,77,96,75,33,24
+ CheckLog ${CLI_MR_LOG} succImmediateAssignProcs8
+ CheckLog ${CLI_MR_LOG} 787
+ CheckLog ${CLI_MR_LOG} 238
+ CheckLog ${CLI_MR_LOG} 785
Verify that PM Mapper correctly identifies a file that should not be mapped based on metadata filtering.
[Tags] PM_MAPPER_09
@@ -137,7 +148,7 @@ SendToDatarouter
${filename} Fetch From Right ${filepath} /
${resp}= PutCall ${PUBLISH_NODE_URL}/${filename} ${request_id} ${pmdata} ${metatdata.replace("\n","")} pmmapper
VerifyResponse ${resp.status_code} 204
- Sleep 10s
+ Sleep 5s
PutCall
[Arguments] ${url} ${request_id} ${data} ${meta} ${user}
diff --git a/tests/dcaegen2/prh-testcases/resources/docker-compose.yml b/tests/dcaegen2/prh-testcases/resources/docker-compose.yml
index f823b6a7..0f66aa14 100644
--- a/tests/dcaegen2/prh-testcases/resources/docker-compose.yml
+++ b/tests/dcaegen2/prh-testcases/resources/docker-compose.yml
@@ -81,7 +81,7 @@ services:
image: docker.io/consul:1.0.6
ports:
- "8500:8500"
- command: ["agent", "-bootstrap", "-client=0.0.0.0", "-server", "-config-dir=/consul/consul.d"]
+ command: ["agent", "-bootstrap", "-client=0.0.0.0", "-server", "-ui", "-config-dir=/consul/consul.d"]
volumes:
- ./consul.d/:/consul/consul.d