aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--plans/aaf/aafapi/setup.sh3
-rw-r--r--plans/aaf/sms-test-plan/teardown.sh10
-rwxr-xr-xplans/appc/healthcheck/health_check.sh2
-rwxr-xr-xplans/dmaap-datarouter/dr-suite/setup.sh1
-rw-r--r--plans/policy/apex-pdp/setup.sh3
-rw-r--r--plans/usecases/5G-bulkpm/assets/datafile_endpoints.json14
-rw-r--r--plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml2
-rw-r--r--plans/usecases/5G-bulkpm/setup.sh8
-rw-r--r--plans/usecases/5G-bulkpm/teardown.sh1
-rwxr-xr-xscripts/dmaap-message-router/dmaap-mr-launch.sh18
-rwxr-xr-xscripts/dmaap-message-router/dmaap-mr-teardown.sh13
-rwxr-xr-xscripts/policy/script1.sh2
-rw-r--r--tests/aaf/aaf-sms-suite/aaf-sms-test.robot113
-rw-r--r--tests/aaf/aafapi/aafapi.robot86
-rw-r--r--tests/appc/healthcheck/APPC_GLOBAL_KEYWORDS.robot (renamed from tests/appc/healthcheck/gettime.robot)27
-rw-r--r--tests/appc/healthcheck/APPC_GLOBAL_VARIABLES.robot9
-rw-r--r--tests/appc/healthcheck/APPC_Netstat.robot5
-rw-r--r--tests/appc/healthcheck/LCM_HEALTHCHECK_TIMESTAMP.robot78
-rw-r--r--tests/appc/healthcheck/LCM_VM_RESTART_TIMESTAMP.robot64
-rw-r--r--tests/appc/healthcheck/LCM_VNF_RESTART_TIMESTAMP.robot72
-rw-r--r--tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot2
-rw-r--r--tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/authorization/xnf-valid-messages-request.json2
-rw-r--r--tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/dcae-fixed-payload-request.json2
-rw-r--r--tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/xnf-fixed-payload-request.json2
-rw-r--r--tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/dcae-invalid-gpb-data-request.json2
-rw-r--r--tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/xnf-invalid-gpb-data-request.json6
-rw-r--r--tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/dcae-invalid-wire-frame-request.json2
-rw-r--r--tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/xnf-invalid-wire-frame-request.json6
-rw-r--r--tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/dcae-smaller-valid-request.json2
-rw-r--r--tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/xnf-simulator-smaller-valid-request.json2
-rw-r--r--tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/too-big-payload/xnf-too-big-payload-request.json6
-rw-r--r--tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/dcae-unsupported-domain-request.json2
-rw-r--r--tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/xnf-unsupported-domain-request.json6
-rw-r--r--tests/dcaegen2-collectors-hv-ves/testcases/resources/ves-hv-configuration.json4
-rw-r--r--tests/dcaegen2/prh-testcases/assets/json_events/event_without_IPV6_field.json10
-rw-r--r--tests/dcaegen2/prh-testcases/prh_tests.robot2
-rw-r--r--tests/dcaegen2/prh-testcases/resources/PrhLibrary.py12
-rwxr-xr-xtests/dmaap-datarouter/dr-suite/dr-suite.robot18
-rw-r--r--tests/policy/suite1/global_properties.robot4
-rw-r--r--tests/usecases/5G-bulkpm/BulkpmE2E.robot43
41 files changed, 325 insertions, 345 deletions
diff --git a/.gitignore b/.gitignore
index 2bc829e4..674baf5b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,6 +11,10 @@ report.html
env.properties
.vagrant
/archives/
+*.jar
+*.zip
+*.tar
+*.gz
*.log
.vagrant
*~
diff --git a/plans/aaf/aafapi/setup.sh b/plans/aaf/aafapi/setup.sh
index add9ae17..dd6cb29e 100644
--- a/plans/aaf/aafapi/setup.sh
+++ b/plans/aaf/aafapi/setup.sh
@@ -44,8 +44,7 @@ export cassandra_service=$(get_docker_compose_service cassandra_container)
for i in {1..12}; do
if [ $(docker inspect --format '{{ .State.Running }}' $aaf_service) ] && \
- [ $(docker inspect --format '{{ .State.Running }}' $cassandra_service) ] && \
- [ $(docker inspect --format '{{ .State.Running }}' $aaf_service) ]
+ [ $(docker inspect --format '{{ .State.Running }}' $cassandra_service) ]
then
echo "AAF Service Running"
break
diff --git a/plans/aaf/sms-test-plan/teardown.sh b/plans/aaf/sms-test-plan/teardown.sh
index 2c8b3e89..fa5c218f 100644
--- a/plans/aaf/sms-test-plan/teardown.sh
+++ b/plans/aaf/sms-test-plan/teardown.sh
@@ -15,11 +15,5 @@
# limitations under the License.
#
-docker cp sms:/sms/sms.log .
-cat sms.log
-rm sms.log
-rm -rf config
-docker stop sms vault
-docker rm sms vault
-docker rmi nexus3.onap.org:10001/onap/aaf/sms
-docker rmi docker.io/vault:0.10.0
+kill-instance.sh sms
+kill-instance.sh vault
diff --git a/plans/appc/healthcheck/health_check.sh b/plans/appc/healthcheck/health_check.sh
index 775188f6..63e0b17a 100755
--- a/plans/appc/healthcheck/health_check.sh
+++ b/plans/appc/healthcheck/health_check.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
###############################################################################
-# Copyright 2018 AT&T
+# Copyright 2017 Huawei Technologies Co., Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
diff --git a/plans/dmaap-datarouter/dr-suite/setup.sh b/plans/dmaap-datarouter/dr-suite/setup.sh
index e5debfc2..023e2658 100755
--- a/plans/dmaap-datarouter/dr-suite/setup.sh
+++ b/plans/dmaap-datarouter/dr-suite/setup.sh
@@ -38,7 +38,6 @@ echo DR_PROV_IP=${DR_PROV_IP}
echo DR_NODE_IP=${DR_NODE_IP}
echo DR_GATEWAY_IP=${DR_GATEWAY_IP}
-docker exec -i datarouter-prov sh -c "curl -k -X PUT https://$DR_PROV_IP:8443/internal/api/NODES?val=dmaap-dr-node\|$DR_GATEWAY_IP"
docker exec -i datarouter-prov sh -c "curl -k -X PUT https://$DR_PROV_IP:8443/internal/api/PROV_AUTH_ADDRESSES?val=dmaap-dr-prov\|$DR_GATEWAY_IP"
#Pass any variables required by Robot test suites in ROBOT_VARIABLES
diff --git a/plans/policy/apex-pdp/setup.sh b/plans/policy/apex-pdp/setup.sh
index 7ab5b9e2..c97072d4 100644
--- a/plans/policy/apex-pdp/setup.sh
+++ b/plans/policy/apex-pdp/setup.sh
@@ -21,11 +21,12 @@ docker run -d --name apex -p 12561:12561 -p 23324:23324 -it nexus3.onap.org:1000
APEX_IP=`get-instance-ip.sh apex`
echo APEX IP IS ${APEX_IP}
-Wait for initialization
+# Wait for initialization
for i in {1..10}; do
curl -sS ${APEX_IP}:23324 && break
echo sleep $i
sleep $i
done
+sleep 10
ROBOT_VARIABLES="-v APEX_IP:${APEX_IP}"
diff --git a/plans/usecases/5G-bulkpm/assets/datafile_endpoints.json b/plans/usecases/5G-bulkpm/assets/datafile_endpoints.json
index 17c7078e..41c4b4fe 100644
--- a/plans/usecases/5G-bulkpm/assets/datafile_endpoints.json
+++ b/plans/usecases/5G-bulkpm/assets/datafile_endpoints.json
@@ -6,8 +6,8 @@
"dmaapPortNumber": 3904,
"dmaapTopicName": "/events/unauthenticated.VES_NOTIFICATION_OUTPUT",
"dmaapProtocol": "http",
- "dmaapUserName": "admin",
- "dmaapUserPassword": "admin",
+ "dmaapUserName": "",
+ "dmaapUserPassword": "",
"dmaapContentType": "application/json",
"consumerId": "C12",
"consumerGroup": "OpenDcae-c12",
@@ -23,6 +23,14 @@
"dmaapUserPassword": "dradmin",
"dmaapContentType": "application/octet-stream"
}
+ },
+ "ftp": {
+ "ftpesConfiguration": {
+ "keyCert": "/config/ftpKey.jks",
+ "keyPassword": "secret",
+ "trustedCA": "/config/ftpKey.jks",
+ "trustedCAPassword": "secret"
+ }
}
}
-} \ No newline at end of file
+}
diff --git a/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml b/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml
index 16db4afa..e0471e57 100644
--- a/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml
+++ b/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml
@@ -76,6 +76,6 @@ services:
ves:
container_name: vescollector
- image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:1.3.1
+ image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:latest
environment:
DMAAPHOST: \ No newline at end of file
diff --git a/plans/usecases/5G-bulkpm/setup.sh b/plans/usecases/5G-bulkpm/setup.sh
index 796b1711..f90e4569 100644
--- a/plans/usecases/5G-bulkpm/setup.sh
+++ b/plans/usecases/5G-bulkpm/setup.sh
@@ -6,7 +6,6 @@ source ${SCRIPTS}/common_functions.sh
mkdir -p $WORKSPACE/archives/dmaapmr
cd $WORKSPACE/archives/dmaapmr
git clone --depth 1 http://gerrit.onap.org/r/dmaap/messagerouter/messageservice -b master
-git pull
cd $WORKSPACE/archives/dmaapmr/messageservice/src/main/resources/docker-compose
cp $WORKSPACE/archives/dmaapmr/messageservice/bundleconfig-local/etc/appprops/MsgRtrApi.properties /var/tmp/
@@ -126,10 +125,11 @@ sed -i 's/dmaapmrhost/'${DMAAP_MR_IP}'/g' /tmp/datafile_endpoints.json
sed -i 's/dmaapdrhost/'${DR_PROV_IP}'/g' /tmp/datafile_endpoints.json
docker cp /tmp/datafile_endpoints.json dfc:/config/
docker restart dfc
+docker exec dfc /bin/sh -c "echo '${DR_NODE_IP}' dmaap-dr-node >> /etc/hosts"
# SFTP Configuration:
# Update the File Ready Notification with actual sftp ip address and copy pm files to sftp server.
-cp $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotification.json $WORKSPACE/tests/usecases/5G-bulkpm-bulkpm/testcases/assets/json_events/FileExistNotificationUpdated.json
+cp $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotification.json $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotificationUpdated.json
sed -i 's/sftpserver/'${SFTP_IP}'/g' $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotificationUpdated.json
docker cp $WORKSPACE/plans/usecases/5G-bulkpm/assets/xNF.pm.xml.gz sftp:/home/admin/
@@ -138,4 +138,6 @@ docker cp $WORKSPACE/plans/usecases/5G-bulkpm/assets/xNF.pm.xml.gz sftp:/home/ad
curl -v -X POST -H "Content-Type:application/vnd.att-dr.feed" -H "X-ATT-DR-ON-BEHALF-OF:dradmin" --data-ascii @$WORKSPACE/plans/usecases/5G-bulkpm/assets/createFeed.json --post301 --location-trusted -k https://${DR_PROV_IP}:8443
cp $WORKSPACE/plans/usecases/5G-bulkpm/assets/addSubscriber.json /tmp/addSubscriber.json
sed -i 's/fileconsumer/'${DR_SUBSCIBER_IP}'/g' /tmp/addSubscriber.json
-curl -v -X POST -H "Content-Type:application/vnd.att-dr.subscription" -H "X-ATT-DR-ON-BEHALF-OF:dradmin" --data-ascii @/tmp/addSubscriber.json --post301 --location-trusted -k https://${DR_PROV_IP}:8443/subscribe/1ii @/tmp/addSubscriber.json --post301 --location-trusted -k https://${DR_PROV_IP}:8443/subscribe/1 \ No newline at end of file
+curl -v -X POST -H "Content-Type:application/vnd.att-dr.subscription" -H "X-ATT-DR-ON-BEHALF-OF:dradmin" --data-ascii @/tmp/addSubscriber.json --post301 --location-trusted -k https://${DR_PROV_IP}:8443/subscribe/1
+sleep 10
+curl -k https://$DR_PROV_IP:8443/internal/prov \ No newline at end of file
diff --git a/plans/usecases/5G-bulkpm/teardown.sh b/plans/usecases/5G-bulkpm/teardown.sh
index c55f4398..954c5dc0 100644
--- a/plans/usecases/5G-bulkpm/teardown.sh
+++ b/plans/usecases/5G-bulkpm/teardown.sh
@@ -1,5 +1,6 @@
#!/bin/bash
echo "Starting teardown script"
+docker exec dfc /bin/sh -c "cat /opt/log/application.log"
kill-instance.sh $DMAAP
kill-instance.sh $KAFKA
kill-instance.sh $ZOOKEEPER
diff --git a/scripts/dmaap-message-router/dmaap-mr-launch.sh b/scripts/dmaap-message-router/dmaap-mr-launch.sh
index 36d31689..e7ea9a97 100755
--- a/scripts/dmaap-message-router/dmaap-mr-launch.sh
+++ b/scripts/dmaap-message-router/dmaap-mr-launch.sh
@@ -34,7 +34,8 @@ function dmaap_mr_launch() {
#
# the default prefix for docker containers is the directory name containing the docker-compose.yml file.
# It can be over-written by an env variable COMPOSE_PROJECT_NAME. This env var seems to be set in the Jenkins CSIT environment
- COMPOSE_PREFIX=${COMPOSE_PROJECT_NAME:-docker-compose}
+ COMPOSE_PREFIX=${COMPOSE_PROJECT_NAME:-dockercompose}
+ export COMPOSE_PROJECT_NAME=$COMPOSE_PREFIX
echo "COMPOSE_PROJECT_NAME=$COMPOSE_PROJECT_NAME"
echo "COMPOSE_PREFIX=$COMPOSE_PREFIX"
@@ -83,12 +84,13 @@ function dmaap_mr_launch() {
docker-compose down
# Update kafkfa and zookeeper properties in MsgRtrApi.propeties which will be copied to DMaaP Container
- sed -i -e 's/<zookeeper_host>/'$ZOOKEEPER_IP'/' /var/tmp/MsgRtrApi.properties
- sed -i -e 's/<kafka_host>:<kafka_port>/'$KAFKA_IP':9092/' /var/tmp/MsgRtrApi.properties
+ sed -i -e 's/<zookeeper_host>/zookeeper/' /var/tmp/MsgRtrApi.properties
+ sed -i -e 's/<kafka_host>:<kafka_port>/kafka:9092/' /var/tmp/MsgRtrApi.properties
docker-compose build
docker login -u docker -p docker nexus3.onap.org:10001
docker-compose up -d
+ docker ps
# Wait for initialization of Docker containers
for i in {1..50}; do
@@ -103,6 +105,16 @@ function dmaap_mr_launch() {
sleep $i
fi
done
+ DMAAP_MR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${COMPOSE_PREFIX}_dmaap_1)
+ IP=${DMAAP_MR_IP}
+ KAFKA_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${COMPOSE_PREFIX}_kafka_1)
+ ZOOKEEPER_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${COMPOSE_PREFIX}_zookeeper_1)
+
+ echo "After restart of ZK and Kafka..."
+ echo DMAAP_MR_IP=${DMAAP_MR_IP}
+ echo IP=${IP}
+ echo KAFKA_IP=${KAFKA_IP}
+ echo ZOOKEEPER_IP=${ZOOKEEPER_IP}
# Wait for initialization of docker services
for i in {1..50}; do
diff --git a/scripts/dmaap-message-router/dmaap-mr-teardown.sh b/scripts/dmaap-message-router/dmaap-mr-teardown.sh
index ac6d798c..a8187d3a 100755
--- a/scripts/dmaap-message-router/dmaap-mr-teardown.sh
+++ b/scripts/dmaap-message-router/dmaap-mr-teardown.sh
@@ -18,7 +18,14 @@
#
function dmaap_mr_teardown() {
-kill-instance.sh docker-compose_dmaap_1
-kill-instance.sh docker-compose_kafka_1
-kill-instance.sh docker-compose_zookeeper_1
+#
+# the default prefix for docker containers is the directory name containing the docker-compose.yml file.
+# It can be over-written by an env variable COMPOSE_PROJECT_NAME. This env var seems to be set in the Jenkins CSIT environment
+COMPOSE_PREFIX=${COMPOSE_PROJECT_NAME:-dockercompose}
+COMPOSE_PROJECT_NAME=$COMPOSE_PREFIX
+echo "COMPOSE_PROJECT_NAME=$COMPOSE_PROJECT_NAME"
+echo "COMPOSE_PREFIX=$COMPOSE_PREFIX"
+kill-instance.sh ${COMPOSE_PREFIX}_dmaap_1
+kill-instance.sh ${COMPOSE_PREFIX}_kafka_1
+kill-instance.sh ${COMPOSE_PREFIX}_zookeeper_1
}
diff --git a/scripts/policy/script1.sh b/scripts/policy/script1.sh
index b38401e3..70706921 100755
--- a/scripts/policy/script1.sh
+++ b/scripts/policy/script1.sh
@@ -147,7 +147,7 @@ TIME_OUT=600
INTERVAL=20
TIME=0
while [ "$TIME" -lt "$TIME_OUT" ]; do
- curl -k -i --user healthcheck:zb!XztG34 -H "ContentType: application/json" -H "Accept: application/json" https://${POLICY_IP}:6969/healthcheck && break
+ curl -k -i --user "demo@people.osaaf.org:demo123456!" -H "ContentType: application/json" -H "Accept: application/json" https://${POLICY_IP}:6969/healthcheck && break
echo Sleep: $INTERVAL seconds before testing if Policy is up. Total wait time up now is: $TIME seconds. Timeout is: $TIME_OUT seconds
sleep $INTERVAL
diff --git a/tests/aaf/aaf-sms-suite/aaf-sms-test.robot b/tests/aaf/aaf-sms-suite/aaf-sms-test.robot
index 78e35222..a88b84f7 100644
--- a/tests/aaf/aaf-sms-suite/aaf-sms-test.robot
+++ b/tests/aaf/aaf-sms-suite/aaf-sms-test.robot
@@ -1,94 +1,69 @@
*** Settings ***
+Suite Setup Run keywords SMS Check SMS API Docker Container Created header Created session
Library OperatingSystem
Library RequestsLibrary
-Library json
*** Variables ***
-${MESSAGE} {"ping": "ok"}
-#global variables
+*** Test Cases ***
+Create Domain
+ [Template] Post template
+ /v1/sms/domain create_domain.json
+ /v1/sms/domain/curltestdomain/secret create_secret.json
+Get information from Domain
+ [Template] Get template
+ /v1/sms/quorum/status
+ /v1/sms/domain/curltestdomain/secret
+ /v1/sms/domain/curltestdomain/secret/curltestsecret1
-*** Test Cases ***
-SMS Check SMS API Docker Container
- [Documentation] Checks if SMS docker container is running
- ${rc} ${output}= Run and Return RC and Output docker ps
- Log To Console *********************
- Log To Console retrurn_code = ${rc}
- Log To Console output = ${output}
- Should Be Equal As Integers ${rc} 0
- Should Contain ${output} nexus3.onap.org:10001/onap/aaf/sms
+Delete from Domain
+ [Template] Delete template
+ /v1/sms/domain/curltestdomain/secret/curltestsecret1
+ /v1/sms/domain/curltestdomain
-SMS GetStatus
- [Documentation] Gets Backend Status
- Create Session SMS ${SMS_HOSTNAME}:${SMS_PORT}
- &{headers}= Create Dictionary Content-Type=application/json Accept=application/json
- ${resp}= Get Request SMS /v1/sms/quorum/status headers=${headers}
- Log To Console *********************
- Log To Console response = ${resp}
- Log To Console body = ${resp.text}
- Should Be Equal As Integers ${resp.status_code} 200
+*** Keywords ***
+Created session
+ Create Session aaf_sms_session ${SMS_HOSTNAME}:${SMS_PORT}
+ Set Suite Variable ${suite_aaf_sms_session} aaf_sms_session
-SMS CreateDomain
- [Documentation] Creates a Secret Domain to hold Secrets
- Create Session SMS ${SMS_HOSTNAME}:${SMS_PORT}
- ${data} Get Binary File ${CURDIR}${/}data${/}create_domain.json
- &{headers}= Create Dictionary Content-Type=application/json Accept=application/json
- ${resp}= Post Request SMS /v1/sms/domain data=${data} headers=${headers}
- Log To Console *********************
- Log To Console response = ${resp}
- Log To Console body = ${resp.text}
- Should Be Equal As Integers ${resp.status_code} 201
+Created header
+ ${headers}= Create Dictionary Content-Type=application/json Accept=application/json
+ Set Suite Variable ${suite_headers} ${headers}
-SMS CreateSecret
- [Documentation] Create A Secret within the Domain
- Create Session SMS ${SMS_HOSTNAME}:${SMS_PORT}
- ${data} Get Binary File ${CURDIR}${/}data${/}create_secret.json
- &{headers}= Create Dictionary Content-Type=application/json Accept=application/json
- ${resp}= Post Request SMS /v1/sms/domain/curltestdomain/secret data=${data} headers=${headers}
+Delete template
+ [Documentation] Deletes from Domain
+ [Arguments] ${topic}
+ ${resp}= Delete Request ${suite_aaf_sms_session} ${topic} headers=${suite_headers}
Log To Console *********************
Log To Console response = ${resp}
Log To Console body = ${resp.text}
- Should Be Equal As Integers ${resp.status_code} 201
+ Should Be Equal As Integers ${resp.status_code} 204
-SMS ListSecret
- [Documentation] Lists all Secret Names within Domain
- Create Session SMS ${SMS_HOSTNAME}:${SMS_PORT}
- &{headers}= Create Dictionary Content-Type=application/json Accept=application/json
- ${resp}= Get Request SMS /v1/sms/domain/curltestdomain/secret headers=${headers}
+Post template
+ [Documentation] Create A Domain/Secret Names
+ [Arguments] ${topic} ${file}
+ ${data} Get Binary File ${CURDIR}${/}data${/}${file}
+ ${resp}= Post Request ${suite_aaf_sms_session} ${topic} data=${data} headers=${suite_headers}
Log To Console *********************
Log To Console response = ${resp}
Log To Console body = ${resp.text}
- Should Be Equal As Integers ${resp.status_code} 200
+ Should Be Equal As Integers ${resp.status_code} 201
-SMS GetSecret
- [Documentation] Gets a single Secret with Values from Domain
- Create Session SMS ${SMS_HOSTNAME}:${SMS_PORT}
- &{headers}= Create Dictionary Content-Type=application/json Accept=application/json
- ${resp}= Get Request SMS /v1/sms/domain/curltestdomain/secret/curltestsecret1 headers=${headers}
+Get template
+ [Documentation] Gets from Domain
+ [Arguments] ${topic}
+ ${resp}= Get Request ${suite_aaf_sms_session} ${topic} headers=${suite_headers}
Log To Console *********************
Log To Console response = ${resp}
Log To Console body = ${resp.text}
Should Be Equal As Integers ${resp.status_code} 200
-SMS DeleteSecret
- [Documentation] Deletes a Secret referenced by Name from Domain
- Create Session SMS ${SMS_HOSTNAME}:${SMS_PORT}
- &{headers}= Create Dictionary Content-Type=application/json Accept=application/json
- ${resp}= Delete Request SMS /v1/sms/domain/curltestdomain/secret/curltestsecret1 headers=${headers}
- Log To Console *********************
- Log To Console response = ${resp}
- Log To Console body = ${resp.text}
- Should Be Equal As Integers ${resp.status_code} 204
-
-SMS DeleteDomain
- [Documentation] Deletes a Domain referenced by Name
- Create Session SMS ${SMS_HOSTNAME}:${SMS_PORT}
- &{headers}= Create Dictionary Content-Type=application/json Accept=application/json
- ${resp}= Delete Request SMS /v1/sms/domain/curltestdomain headers=${headers}
+SMS Check SMS API Docker Container
+ [Documentation] Checks if SMS docker container is running
+ ${rc} ${output}= Run and Return RC and Output docker ps
Log To Console *********************
- Log To Console response = ${resp}
- Log To Console body = ${resp.text}
- Should Be Equal As Integers ${resp.status_code} 204
-
-*** Keywords ***
+ Log To Console retrurn_code = ${rc}
+ Log To Console output = ${output}
+ Should Be Equal As Integers ${rc} 0
+ Should Contain ${output} nexus3.onap.org:10001/onap/aaf/sms
diff --git a/tests/aaf/aafapi/aafapi.robot b/tests/aaf/aafapi/aafapi.robot
index b1f8e746..0f2267be 100644
--- a/tests/aaf/aafapi/aafapi.robot
+++ b/tests/aaf/aafapi/aafapi.robot
@@ -1,63 +1,45 @@
*** Settings ***
-Library OperatingSystem
+Suite Setup Run keywords Created header Created session
Library RequestsLibrary
-Library requests
Library Collections
-Library String
*** Variables ***
-${TARGETURL_NAMESPACE} http://${AAF_IP}:8101/authz/nss/org.openecomp
-${TARGETURL_PERMS} http://${AAF_IP}:8101/authz/perms/user/dgl@openecomp.org
-${TARGETURL_ROLES} http://${AAF_IP}:8101/authz/roles/user/dgl@openecomp.org
-${username} dgl@openecomp.org
-${password} ecomp_admin
-
*** Test Cases ***
-View Namesapce
- [Tags] get
- CreateSession aaf http://${AAF_IP}:8101
- &{headers}= Create Dictionary Authorization=Basic ZGdsQG9wZW5lY29tcC5vcmc6ZWNvbXBfYWRtaW4= Content-Type=application/json Accept=application/json
- ${resp}= Get Request aaf /authz/nss/org.openecomp headers=&{headers}
- Should Be Equal As Strings ${resp.status_code} 200
- log 'JSON Response Code :'${resp.text}
-
-View by User Permission
- [Tags] get
- CreateSession aaf http://${AAF_IP}:8101
- &{headers}= Create Dictionary Authorization=Basic ZGdsQG9wZW5lY29tcC5vcmc6ZWNvbXBfYWRtaW4= Content-Type=application/json Accept=application/json
- ${resp}= Get Request aaf authz/perms/user/dgl@openecomp.org headers=&{headers}
- Should Be Equal As Strings ${resp.status_code} 200
- log 'JSON Response Code :'${resp.text}
-
-View by User Role
- [Tags] get
- CreateSession aaf http://${AAF_IP}:8101
- &{headers}= Create Dictionary Authorization=Basic ZGdsQG9wZW5lY29tcC5vcmc6ZWNvbXBfYWRtaW4= Content-Type=application/json Accept=application/json
- ${resp}= Get Request aaf authz/roles/user/dgl@openecomp.org headers=&{headers}
- Should Be Equal As Strings ${resp.status_code} 200
- log 'JSON Response Code :'${resp.text}
+View information from app
+ [Template] Get template
+ /authz/nss/org.openecomp
+ authz/perms/user/dgl@openecomp.org
+ authz/roles/user/dgl@openecomp.org
-Cleanup Namespace ( 424 Response - Delete dependencies and try again)
+Cleanup Namespace ( 424 Response - Delete dependencies and try again )
[Tags] delete
- CreateSession aaf http://${AAF_IP}:8101
- &{headers}= Create Dictionary Authorization=Basic ZGdsQG9wZW5lY29tcC5vcmc6ZWNvbXBfYWRtaW4= Content-Type=application/json Accept=application/json
- ${resp}= Delete Request aaf authz/ns/org.openecomp.dmaapBC headers=&{headers}
+ ${resp}= Delete Request ${suite_aaf_session} authz/ns/org.openecomp.dmaapBC headers=${suite_headers}
Should Be Equal As Strings ${resp.status_code} 424
log 'JSON Response Code :'${resp.text}
-
-Add Data ( Add Admin to Namespace Explicit )
- [Tags] post
- CreateSession aaf http://${AAF_IP}:8101
- &{headers}= Create Dictionary Authorization=Basic ZGdsQG9wZW5lY29tcC5vcmc6ZWNvbXBfYWRtaW4= Content-Type=application/json Accept=application/json
- ${resp}= Post Request aaf authz/ns/org.openecomp.dmaapBC/admin/alexD@openecomp.org headers=&{headers}
- Should Be Equal As Strings ${resp.status_code} 403
- log 'JSON Response Code :'${resp.text}
-
-View Explicit Permission
- [Tags] post
- CreateSession aaf http://${AAF_IP}:8101
- &{headers}= Create Dictionary Authorization=Basic ZGdsQG9wZW5lY29tcC5vcmc6ZWNvbXBfYWRtaW4= Content-Type=application/json Accept=application/json
- ${resp}= Post Request aaf authz/perms/user/m99751@dmaapBC.openecomp.org headers=&{headers}
- Should Be Equal As Strings ${resp.status_code} 406
- log 'JSON Response Code :'${resp.text} \ No newline at end of file
+
+Add information to app
+ [Template] Post template
+ authz/ns/org.openecomp.dmaapBC/admin/alexD@openecomp.org 403
+ authz/perms/user/m99751@dmaapBC.openecomp.org 406
+
+*** Keywords ***
+Created session
+ Create Session aaf_session http://${AAF_IP}:8101
+ Set Suite Variable ${suite_aaf_session} aaf_session
+
+Created header
+ ${headers}= Create Dictionary Authorization=Basic ZGdsQG9wZW5lY29tcC5vcmc6ZWNvbXBfYWRtaW4= Content-Type=application/json Accept=application/json
+ Set Suite Variable ${suite_headers} ${headers}
+
+Get template
+ [Arguments] ${topic}
+ ${resp}= Get Request ${suite_aaf_session} ${topic} headers=${suite_headers}
+ Should Be Equal As Strings ${resp.status_code} 200
+ log 'JSON Response Code :'${resp.text}
+
+Post template
+ [Arguments] ${topic} ${response_status_code}
+ ${resp}= Post Request ${suite_aaf_session} ${topic} headers=${suite_headers}
+ Should Be Equal As Strings ${resp.status_code} ${response_status_code}
+ log 'JSON Response Code :'${resp.text}
diff --git a/tests/appc/healthcheck/gettime.robot b/tests/appc/healthcheck/APPC_GLOBAL_KEYWORDS.robot
index 9f376f9b..d59fefa8 100644
--- a/tests/appc/healthcheck/gettime.robot
+++ b/tests/appc/healthcheck/APPC_GLOBAL_KEYWORDS.robot
@@ -3,12 +3,10 @@ Library Selenium2Library
Library OperatingSystem
Library DateTime
Library String
-##Library HttpLibrary.HTTP
Library Collections
*** Keywords ***
-
Get Server time
[Documentation] Getting server time to update the json request
[Arguments] ${RequestFile}
@@ -16,10 +14,10 @@ Get Server time
${date}= Get Current Date time_zone=local result_format=%Y-%m-%dT%H:%M:%S.%fZ exclude_millis=False
#updating the request file with the server time
- ${file_content}= OperatingSystem.Get File ${RequestFile}
- @{list}= Split to lines ${file_content}
- ${data}= Get from list ${list} 5
- @{splitted_string}= Split String ${data} : 1
+ ${file_content}= Get File ${RequestFile}
+ @{list}= Split to lines ${file_content}
+ ${data}= Get from list ${list} 5
+ @{splitted_string}= Split String ${data} : 1
${time}= Get From List ${splitted_string} 1
Log ${time}
@{splitted_string_time}= Split String ${time} " 2
@@ -27,14 +25,9 @@ Get Server time
Log ${times1}
${replaced_string}= Replace String ${data} ${times1} ${date}
@{list1}= Split to lines ${file_content}
- Remove from list ${list1} 5
- Insert into list ${list1} 5 ${replaced_string}
- Remove File ${RequestFile}
- :FOR ${line} IN @{list1}
- \ Append to File ${RequestFile} ${line} encoding=UTF-8
- \ Append to File ${RequestFile} ${\n} encoding=UTF-8
-
-
-
-
- \ No newline at end of file
+ Remove from list ${list1} 5
+ Insert into list ${list1} 5 ${replaced_string}
+ Remove File ${RequestFile}
+ :FOR ${line} IN @{list1}
+ \ Append to File ${RequestFile} ${line} encoding=UTF-8
+ \ Append to File ${RequestFile} ${\n} encoding=UTF-8
diff --git a/tests/appc/healthcheck/APPC_GLOBAL_VARIABLES.robot b/tests/appc/healthcheck/APPC_GLOBAL_VARIABLES.robot
index b869434f..9b399228 100644
--- a/tests/appc/healthcheck/APPC_GLOBAL_VARIABLES.robot
+++ b/tests/appc/healthcheck/APPC_GLOBAL_VARIABLES.robot
@@ -5,6 +5,9 @@ Documentation store all properties that can change or are used in multipl
*** Variables ***
-${GLOBAL_VNF_RESTART_REQUESTFILE} ${CURDIR}/LCM_VNF_RESTART_REQUEST.txt
-${GLOBAL_VM_RESTART_REQUESTFILE} ${CURDIR}/LCM_VM_RESTART_REQUEST.txt
-${GLOBAL_HEALTHCHECK_REQUESTFILE} ${CURDIR}/LCM_VM_HEALTHCHECK_REQUEST.txt \ No newline at end of file
+#${GLOBAL_VNF_RESTART_REQUESTFILE} ${CURDIR}/LCM_VNF_RESTART_REQUEST.txt
+#${GLOBAL_VM_RESTART_REQUESTFILE} ${CURDIR}/LCM_VM_RESTART_REQUEST.txt
+#${GLOBAL_HEALTHCHECK_REQUESTFILE} ${CURDIR}/LCM_VM_HEALTHCHECK_REQUEST.txt
+${GLOBAL_APPC_ADMIN_USER} admin
+${GLOBAL_APPC_ADMIN_PASS} Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
+# to try to fire up the test again because the first one was failure in 90 minutes
diff --git a/tests/appc/healthcheck/APPC_Netstat.robot b/tests/appc/healthcheck/APPC_Netstat.robot
index 285fc372..200a4966 100644
--- a/tests/appc/healthcheck/APPC_Netstat.robot
+++ b/tests/appc/healthcheck/APPC_Netstat.robot
@@ -1,8 +1,11 @@
*** Settings ***
Library OperatingSystem
+Library String
*** Test Cases ***
APPC Netstat
[Documentation] Checking the active ports
- ${output}= Run netstat -a | grep -E 8282 | grep LISTEN
+ ${output}= Run netstat -a | grep -E ":8282 " | grep LISTEN
Log To Console ${output}
+ ${line_count}= Get Line Count ${output}
+ Should Be Equal As Strings ${line_count} 1
diff --git a/tests/appc/healthcheck/LCM_HEALTHCHECK_TIMESTAMP.robot b/tests/appc/healthcheck/LCM_HEALTHCHECK_TIMESTAMP.robot
index 1cea75e9..8c75addc 100644
--- a/tests/appc/healthcheck/LCM_HEALTHCHECK_TIMESTAMP.robot
+++ b/tests/appc/healthcheck/LCM_HEALTHCHECK_TIMESTAMP.robot
@@ -1,52 +1,42 @@
*** Settings ***
Library Selenium2Library
-Library OperatingSystem
Library XvfbRobot
-Resource APPC_GLOBAL_VARIABLES.robot
-Resource gettime.robot
+Resource ${CURDIR}/APPC_GLOBAL_VARIABLES.robot
+Resource ${CURDIR}/APPC_GLOBAL_KEYWORDS.robot
-*** Variable ***
-${ResponseCode}
-${var}
*** Test Cases ***
-
APPC LCM API HEALTHCHECK
- [Documentation] APPC LCM API HEALTHCHECK
- Start Virtual Display 1920 1080
- Open Browser http://admin:Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U@localhost:8282/apidoc/explorer/index.html chrome
-# Maximize Browser Window
-# Click Element xpath=.//p[contains(text(),'If you have reason to expect the website is safe, select the I Accept the Risk button to continue.')]//following::img
-
- Reload Page
-
-# Wait Until Page Contains Element xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')]
-
-# Set Selenium Speed 60
-# Click Element xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')]
-
-
-# wait until page contains element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')]
-# Set Selenium Speed 60
-# Click link xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')]/following::li[5]/ul/li/div[1]/h3/span[2]/a
-# Click Element xpath=//*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0"]/div[1]/h3/span[2]/a
-
-# Get Server time ${GLOBAL_HEALTHCHECK_REQUESTFILE}
-# ${file_content}= OperatingSystem.Get File ${GLOBAL_HEALTHCHECK_REQUESTFILE}
+ [Documentation] APPC LCM API HEALTHCHECK
+ [Teardown] Close All Browsers
+ Start Virtual Display 1920 1080
+ Open Browser http://${GLOBAL_APPC_ADMIN_USER}:${GLOBAL_APPC_ADMIN_PASS}@localhost:8282/apidoc/explorer/index.html chrome
+ Set Window Size 1920 1080
+# Click Element xpath=.//p[contains(text(),'If you have reason to expect the website is safe, select the I Accept the Risk button to continue.')]//following::img
+
+ Reload Page
+
+# Wait Until Page Contains Element xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')]
+
+# Set Selenium Speed 60
+# Click Element xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')]
+
+# wait until page contains element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')]
+# Set Selenium Speed 60
+# Click link xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')]/following::li[5]/ul/li/div[1]/h3/span[2]/a
+# Click Element xpath=//*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0"]/div[1]/h3/span[2]/a
+
+# Get Server time ${GLOBAL_HEALTHCHECK_REQUESTFILE}
+# ${file_content}= OperatingSystem.Get File ${GLOBAL_HEALTHCHECK_REQUESTFILE}
-# wait until page contains element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')]//following::table
-# Set Selenium Speed 90
-# Input Text xpath=(.//*[contains(text(),'(health-check)input-TOP')])[1]/following::textarea[1] ${file_content}
-# Input Text xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')]//following::table//tbody/tr/td[2]/textarea ${file_content}
-
-# wait until page contains element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')]//following::form/div[2]/input[1]
-# Set Selenium Speed 90
-# Click Element xpath=//*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0_content"]/form/div[2]/input
-
-## ${var}= Get Value xpath= //*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0_content"]/div[2]/div[3]/pre
-## Element Text Should Be xpath=//*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0_content"]/div[2]/div[3]/pre[1][text()='200'] 200 expected
-
-Tear Down
-
- [Documentation] Close all browsers
- Close All Browsers
+# wait until page contains element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')]//following::table
+# Set Selenium Speed 90
+# Input Text xpath=(.//*[contains(text(),'(health-check)input-TOP')])[1]/following::textarea[1] ${file_content}
+# Input Text xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')]//following::table//tbody/tr/td[2]/textarea ${file_content}
+
+# wait until page contains element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')]//following::form/div[2]/input[1]
+# Set Selenium Speed 90
+# Click Element xpath=//*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0_content"]/form/div[2]/input
+
+## ${var}= Get Value xpath= //*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0_content"]/div[2]/div[3]/pre
+## Element Text Should Be xpath=//*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0_content"]/div[2]/div[3]/pre[1][text()='200'] 200 expected
diff --git a/tests/appc/healthcheck/LCM_VM_RESTART_TIMESTAMP.robot b/tests/appc/healthcheck/LCM_VM_RESTART_TIMESTAMP.robot
index 7968d552..f49af460 100644
--- a/tests/appc/healthcheck/LCM_VM_RESTART_TIMESTAMP.robot
+++ b/tests/appc/healthcheck/LCM_VM_RESTART_TIMESTAMP.robot
@@ -1,47 +1,39 @@
*** Settings ***
Library Selenium2Library
-Library OperatingSystem
-Library XvfbRobot
-Resource APPC_GLOBAL_VARIABLES.robot
-Resource gettime.robot
+Library XvfbRobot
+Resource ${CURDIR}/APPC_GLOBAL_VARIABLES.robot
+Resource ${CURDIR}/APPC_GLOBAL_KEYWORDS.robot
-*** Variable ***
-${ResponseCode}
-${var}
*** Test Cases ***
APPC LCM API VM RESTART
- [Documentation] APPC LCM API VM RESTART
- Start Virtual Display 1920 1080
- Open Browser http://admin:Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U@localhost:8282/apidoc/explorer/index.html chrome
-# Maximize Browser Window
-# Click Element xpath=.//p[contains(text(),'If you have reason to expect the website is safe, select the I Accept the Risk button to continue.')]//following::img
-
- Reload Page
-
-# Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a
-# Set Selenium Speed 60
-# Click Element xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')]
-
-# Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]
-# Set Selenium Speed 60
-# Click Element xpath=.//*[contains(text(),'appc-provider-lcm:restart')]
-
+ [Documentation] APPC LCM API VM RESTART
+ [Teardown] Close All Browsers
+ Start Virtual Display 1920 1080
+ Open Browser http://${GLOBAL_APPC_ADMIN_USER}:${GLOBAL_APPC_ADMIN_PASS}@localhost:8282/apidoc/explorer/index.html chrome
+ Set Window Size 1920 1080
+# Click Element xpath=.//p[contains(text(),'If you have reason to expect the website is safe, select the I Accept the Risk button to continue.')]//following::img
+
+ Reload Page
+
+# Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a
+# Set Selenium Speed 60
+# Click Element xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')]
+
+# Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]
+# Set Selenium Speed 60
+# Click Element xpath=.//*[contains(text(),'appc-provider-lcm:restart')]
+
# Get Server time ${GLOBAL_VM_RESTART_REQUESTFILE}
# ${file_content}= OperatingSystem.Get File ${GLOBAL_VM_RESTART_REQUESTFILE}
# Wait Until Page Contains Element xpath=//td[contains(text(), '(restart)input-TOP')]//following::textarea[@name='(restart)input-TOP'][3]
-# Set Selenium Speed 90
-# Input Text xpath=(.//*[contains(text(),'(restart)input-TOP')])[5]/following::textarea[1] ${file_content}
-# Input Text xpath= //td[contains(text(), '(restart)input-TOP')]//following::textarea[@name='(restart)input-TOP'][3] ${file_content}
-
-# Click Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::form/div[2]/input[1]
-
-# ${var}= Get Value xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[contains(text(),'Response Code')][1]//following-sibling::div//pre
-# Element Text Should Be xpath=//*[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[text()='Response Code'][1]//following-sibling::div//pre[1][text()='200'] 200 expected
-
-
-Tear Down
- [Documentation] Close all browsers
- Close All Browsers
+# Set Selenium Speed 90
+# Input Text xpath=(.//*[contains(text(),'(restart)input-TOP')])[5]/following::textarea[1] ${file_content}
+# Input Text xpath= //td[contains(text(), '(restart)input-TOP')]//following::textarea[@name='(restart)input-TOP'][3] ${file_content}
+
+# Click Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::form/div[2]/input[1]
+
+# ${var}= Get Value xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[contains(text(),'Response Code')][1]//following-sibling::div//pre
+# Element Text Should Be xpath=//*[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[text()='Response Code'][1]//following-sibling::div//pre[1][text()='200'] 200 expected
diff --git a/tests/appc/healthcheck/LCM_VNF_RESTART_TIMESTAMP.robot b/tests/appc/healthcheck/LCM_VNF_RESTART_TIMESTAMP.robot
index 93c72d72..ed85d4a1 100644
--- a/tests/appc/healthcheck/LCM_VNF_RESTART_TIMESTAMP.robot
+++ b/tests/appc/healthcheck/LCM_VNF_RESTART_TIMESTAMP.robot
@@ -1,50 +1,40 @@
*** Settings ***
Library Selenium2Library
-Library OperatingSystem
-Library XvfbRobot
+Library XvfbRobot
Resource ${CURDIR}/APPC_GLOBAL_VARIABLES.robot
-Resource ${CURDIR}/gettime.robot
+Resource ${CURDIR}/APPC_GLOBAL_KEYWORDS.robot
-
-*** Variable ***
-${ResponseCode}
-${var}
-
*** Test Cases ***
-
APPC LCM API VNF RESTART
- [Documentation] APPC LCM API VNF RESTART
- Start Virtual Display 1920 1080
- Open Browser http://admin:Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U@localhost:8282/apidoc/explorer/index.html chrome
-# Maximize Browser Window
-# Click Element xpath=.//p[contains(text(),'If you have reason to expect the website is safe, select the I Accept the Risk button to continue.')]//following::img
-
- Reload Page
-
-# Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a
-# Set Selenium Speed 60
-# Click Element xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')]
-
-
-# Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]
-# Set Selenium Speed 60
-# Click Element xpath=.//*[contains(text(),'appc-provider-lcm:restart')]
-
-# Get Server time ${GLOBAL_VNF_RESTART_REQUESTFILE}
-# ${file_content}= OperatingSystem.Get File ${GLOBAL_VNF_RESTART_REQUESTFILE}
+ [Documentation] APPC LCM API VNF RESTART
+ [Teardown] Close All Browsers
+# Set the timeout because Open Browser ended with timeout...
+ Set Selenium Timeout 5 seconds
+ Start Virtual Display 1920 1080
+ Open Browser http://${GLOBAL_APPC_ADMIN_USER}:${GLOBAL_APPC_ADMIN_PASS}@localhost:8282/apidoc/explorer/index.html chrome
+ Set Window Size 1920 1080
+# Click Element xpath=.//p[contains(text(),'If you have reason to expect the website is safe, select the I Accept the Risk button to continue.')]//following::img
+
+ Reload Page
+
+# Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a
+# Set Selenium Speed 60
+# Click Element xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')]
+
+# Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]
+# Set Selenium Speed 60
+# Click Element xpath=.//*[contains(text(),'appc-provider-lcm:restart')]
+
+# Get Server time ${GLOBAL_VNF_RESTART_REQUESTFILE}
+# ${file_content}= OperatingSystem.Get File ${GLOBAL_VNF_RESTART_REQUESTFILE}
# Wait Until Page Contains Element xpath=//td[contains(text(), '(restart)input-TOP')]//following::textarea[@name='(restart)input-TOP'][3]
-# Set Selenium Speed 90
-# Input Text xpath=(.//*[contains(text(),'(restart)input-TOP')])[5]/following::textarea[1] ${file_content}
-# Click Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::form/div[2]/input[1]
-
-# Input Text xpath= //td[contains(text(), '(restart)input-TOP')]//following::textarea[@name='(restart)input-TOP'][3] ${file_content}
-
-# ${var}= Get Value xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[contains(text(),'Response Code')][1]//following-sibling::div//pre
-# Element Text Should Be xpath=//*[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[text()='Response Code'][1]//following-sibling::div//pre[1][text()='200'] 200 expected
-
-
-Tear Down
- [Documentation] Close all browsers
- Close All Browsers
+# Set Selenium Speed 90
+# Input Text xpath=(.//*[contains(text(),'(restart)input-TOP')])[5]/following::textarea[1] ${file_content}
+# Click Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::form/div[2]/input[1]
+
+# Input Text xpath= //td[contains(text(), '(restart)input-TOP')]//following::textarea[@name='(restart)input-TOP'][3] ${file_content}
+
+# ${var}= Get Value xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[contains(text(),'Response Code')][1]//following-sibling::div//pre
+# Element Text Should Be xpath=//*[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[text()='Response Code'][1]//following-sibling::div//pre[1][text()='200'] 200 expected
diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot b/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot
index 7b99fb0d..60580083 100644
--- a/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot
+++ b/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot
@@ -50,7 +50,7 @@ ${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-ran-meas
+${ROUTED_MESSAGES_TOPIC} TEST_HV_VES_PERF3GPP
${VES_HV_RESOURCES} %{WORKSPACE}/tests/dcaegen2-collectors-hv-ves/testcases/resources
${VES_HV_CONFIGURATION_JSON_FILEPATH} ${VES_HV_RESOURCES}/ves-hv-configuration.json
diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/authorization/xnf-valid-messages-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/authorization/xnf-valid-messages-request.json
index 9aca4015..25e7272c 100644
--- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/authorization/xnf-valid-messages-request.json
+++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/authorization/xnf-valid-messages-request.json
@@ -2,7 +2,7 @@
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "perf3gpp",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/dcae-fixed-payload-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/dcae-fixed-payload-request.json
index 642c7d56..92b0deca 100644
--- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/dcae-fixed-payload-request.json
+++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/dcae-fixed-payload-request.json
@@ -2,7 +2,7 @@
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "perf3gpp",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/xnf-fixed-payload-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/xnf-fixed-payload-request.json
index 642c7d56..92b0deca 100644
--- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/xnf-fixed-payload-request.json
+++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/xnf-fixed-payload-request.json
@@ -2,7 +2,7 @@
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "perf3gpp",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/dcae-invalid-gpb-data-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/dcae-invalid-gpb-data-request.json
index f38e9aa0..3b57160f 100644
--- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/dcae-invalid-gpb-data-request.json
+++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/dcae-invalid-gpb-data-request.json
@@ -2,7 +2,7 @@
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "perf3gpp",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/xnf-invalid-gpb-data-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/xnf-invalid-gpb-data-request.json
index 22d48c5f..612bfedf 100644
--- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/xnf-invalid-gpb-data-request.json
+++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/xnf-invalid-gpb-data-request.json
@@ -2,7 +2,7 @@
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "perf3gpp",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
@@ -24,7 +24,7 @@
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "perf3gpp",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
@@ -46,7 +46,7 @@
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "perf3gpp",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/dcae-invalid-wire-frame-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/dcae-invalid-wire-frame-request.json
index f38e9aa0..3b57160f 100644
--- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/dcae-invalid-wire-frame-request.json
+++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/dcae-invalid-wire-frame-request.json
@@ -2,7 +2,7 @@
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "perf3gpp",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/xnf-invalid-wire-frame-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/xnf-invalid-wire-frame-request.json
index a7d22190..6d63acc8 100644
--- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/xnf-invalid-wire-frame-request.json
+++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/xnf-invalid-wire-frame-request.json
@@ -2,7 +2,7 @@
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "perf3gpp",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
@@ -24,7 +24,7 @@
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "perf3gpp",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
@@ -46,7 +46,7 @@
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "perf3gpp",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/dcae-smaller-valid-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/dcae-smaller-valid-request.json
index 89f3e067..dc160e51 100644
--- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/dcae-smaller-valid-request.json
+++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/dcae-smaller-valid-request.json
@@ -2,7 +2,7 @@
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "perf3gpp",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/xnf-simulator-smaller-valid-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/xnf-simulator-smaller-valid-request.json
index 60c81a89..49d9bd93 100644
--- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/xnf-simulator-smaller-valid-request.json
+++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/xnf-simulator-smaller-valid-request.json
@@ -2,7 +2,7 @@
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "perf3gpp",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/too-big-payload/xnf-too-big-payload-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/too-big-payload/xnf-too-big-payload-request.json
index 54836bf3..4296d485 100644
--- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/too-big-payload/xnf-too-big-payload-request.json
+++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/too-big-payload/xnf-too-big-payload-request.json
@@ -2,7 +2,7 @@
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "perf3gpp",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
@@ -24,7 +24,7 @@
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "perf3gpp",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
@@ -46,7 +46,7 @@
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "perf3gpp",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/dcae-unsupported-domain-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/dcae-unsupported-domain-request.json
index f38e9aa0..3b57160f 100644
--- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/dcae-unsupported-domain-request.json
+++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/dcae-unsupported-domain-request.json
@@ -2,7 +2,7 @@
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "perf3gpp",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/xnf-unsupported-domain-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/xnf-unsupported-domain-request.json
index b3aada5b..43e90874 100644
--- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/xnf-unsupported-domain-request.json
+++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/xnf-unsupported-domain-request.json
@@ -2,7 +2,7 @@
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "perf3gpp",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
@@ -24,7 +24,7 @@
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "FAULT",
+ "domain": "fault",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
@@ -46,7 +46,7 @@
{
"commonEventHeader": {
"version": "sample-version",
- "domain": "HVMEAS",
+ "domain": "perf3gpp",
"sequence": 1,
"priority": 1,
"eventId": "sample-event-id",
diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/ves-hv-configuration.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/ves-hv-configuration.json
index b9e1a4b5..9ef72497 100644
--- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/ves-hv-configuration.json
+++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/ves-hv-configuration.json
@@ -2,8 +2,8 @@
"dmaap.kafkaBootstrapServers": "kafka:9092",
"collector.routing": [
{
- "fromDomain": "HVMEAS",
- "toTopic": "test-hv-ran-meas"
+ "fromDomain": "perf3gpp",
+ "toTopic": "TEST_HV_VES_PERF3GPP"
}
]
} \ No newline at end of file
diff --git a/tests/dcaegen2/prh-testcases/assets/json_events/event_without_IPV6_field.json b/tests/dcaegen2/prh-testcases/assets/json_events/event_without_IPV6_field.json
new file mode 100644
index 00000000..0aa0372c
--- /dev/null
+++ b/tests/dcaegen2/prh-testcases/assets/json_events/event_without_IPV6_field.json
@@ -0,0 +1,10 @@
+{
+ "event": {
+ "commonEventHeader": {
+ "sourceName":"NOK6061ZW9"
+ },
+ "pnfRegistrationFields": {
+ "oamV4IpAddress":"10.17.123.24"
+ }
+ }
+}
diff --git a/tests/dcaegen2/prh-testcases/prh_tests.robot b/tests/dcaegen2/prh-testcases/prh_tests.robot
index 55f484fa..62698455 100644
--- a/tests/dcaegen2/prh-testcases/prh_tests.robot
+++ b/tests/dcaegen2/prh-testcases/prh_tests.robot
@@ -18,6 +18,7 @@ ${EVENT_WITH_MISSING_SOURCENAME} %{WORKSPACE}/tests/dcaegen2/prh-testcases/as
${EVENT_WITH_MISSING_SOURCENAME_AND_IPV4} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName_and_IPV4.json
${EVENT_WITH_MISSING_SOURCENAME_AND_IPV6} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName_and_IPV6.json
${EVENT_WITH_MISSING_SOURCENAME_IPV4_AND_IPV6} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName_IPV4_and_IPV6.json
+${EVENT_WITHOUT_IPV6_FILED} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_without_IPV6_field.json
${Not_json_format} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/not_json_format.json
*** Test Cases ***
@@ -28,6 +29,7 @@ Valid DMaaP event can be converted to PNF_READY notification
${EVENT_WITH_ALL_VALID_REQUIRED_FIELDS}
${EVENT_WITH_IPV4}
${EVENT_WITH_IPV6}
+ ${EVENT_WITHOUT_IPV6_FILED}
Invalid DMaaP event cannot be converted to PNF_READY notification
[Documentation] PRH get invalid event from DMaaP with missing required fields - PRH does not produce PNF_READY notification
diff --git a/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py b/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py
index 6a95c71e..656f6fc3 100644
--- a/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py
+++ b/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py
@@ -21,18 +21,18 @@ class PrhLibrary(object):
@staticmethod
def create_pnf_ready_notification(json_file):
json_to_python = json.loads(json_file)
- ipv4 = json_to_python["event"]["pnfRegistrationFields"]["oamV4IpAddress"]
- ipv6 = json_to_python["event"]["pnfRegistrationFields"]["oamV6IpAddress"]
- correlationId = json_to_python["event"]["commonEventHeader"]["sourceName"]
- str_json = '{"correlationId":"' + correlationId + '","ipaddress-v4-oam":"' + ipv4 + '","ipaddress-v6-oam":"' + ipv6 + '"}'
+ ipv4 = json_to_python.get("event").get("pnfRegistrationFields").get("oamV4IpAddress")
+ ipv6 = json_to_python.get("event").get("pnfRegistrationFields").get("oamV6IpAddress") if "oamV6IpAddress" in json_to_python["event"]["pnfRegistrationFields"] else ""
+ correlation_id = json_to_python.get("event").get("commonEventHeader").get("sourceName")
+ str_json = '{"correlationId":"' + correlation_id + '","ipaddress-v4-oam":"' + ipv4 + '","ipaddress-v6-oam":"' + ipv6 + '"}'
python_to_json = json.dumps(str_json)
return python_to_json.replace("\\", "")[1:-1]
@staticmethod
def create_pnf_name(json_file):
json_to_python = json.loads(json_file)
- correlationId = json_to_python["event"]["commonEventHeader"]["sourceName"]
- return correlationId
+ correlation_id = json_to_python.get("sourceName")
+ return correlation_id
@staticmethod
def stop_aai():
diff --git a/tests/dmaap-datarouter/dr-suite/dr-suite.robot b/tests/dmaap-datarouter/dr-suite/dr-suite.robot
index fcac2026..d00bddc7 100755
--- a/tests/dmaap-datarouter/dr-suite/dr-suite.robot
+++ b/tests/dmaap-datarouter/dr-suite/dr-suite.robot
@@ -10,7 +10,8 @@ ${TARGET_URL} https://${DR_PROV_IP}:8443
${TARGET_URL_FEED} https://${DR_PROV_IP}:8443/feed/1
${TARGET_URL_SUBSCRIBE} https://${DR_PROV_IP}:8443/subscribe/1
${TARGET_URL_SUBSCRIPTION} https://${DR_PROV_IP}:8443/subs/1
-${TARGET_URL_PUBLISH} https://${DR_NODE_IP}:8443/publish/1/csit_test
+${TARGET_URL_PUBLISH_PROV} https://${DR_PROV_IP}:8443/publish/1/csit_test
+${TARGET_URL_PUBLISH_NODE} https://${DR_NODE_IP}:8443/publish/1/csit_test
${CREATE_FEED_DATA} {"name": "CSIT_Test", "version": "m1.0", "description": "CSIT_Test", "business_description": "CSIT_Test", "suspend": false, "deleted": false, "changeowner": true, "authorization": {"classification": "unclassified", "endpoint_addrs": [], "endpoint_ids": [{"password": "rs873m", "id": "rs873m"}]}}
${UPDATE_FEED_DATA} {"name": "CSIT_Test", "version": "m1.0", "description": "UPDATED-CSIT_Test", "business_description": "CSIT_Test", "suspend": true, "deleted": false, "changeowner": true, "authorization": {"classification": "unclassified", "endpoint_addrs": [], "endpoint_ids": [{"password": "rs873m", "id": "rs873m"}]}}
${SUBSCRIBE_DATA} {"delivery":{ "url":"https://${DR_PROV_IP}:8080/", "user":"rs873m", "password":"rs873m", "use100":true}, "metadataOnly":false, "suspend":false, "groupid":29, "subscriber":"sg481n"}
@@ -42,9 +43,10 @@ Run Publish Feed
[Documentation] Publish to Feed
[Timeout] 1 minute
Sleep 10s Behaviour was noticed where feed was not created in time for publish to be sent
- ${resp}= PutCall ${TARGET_URL_PUBLISH} ${CREATE_FEED_DATA} ${PUBLISH_FEED_CONTENT_TYPE} rs873m
- log ${TARGET_URL_PUBLISH}
- log ${resp.text}
+ ${resp}= PutCall ${TARGET_URL_PUBLISH_PROV} ${CREATE_FEED_DATA} ${PUBLISH_FEED_CONTENT_TYPE} rs873m
+ log ${TARGET_URL_PUBLISH_PROV}
+ Should Contain ${resp.headers['Location']} https://dmaap-dr-node:8443/publish/1/csit_test
+ ${resp}= PutCall ${TARGET_URL_PUBLISH_NODE} ${CREATE_FEED_DATA} ${PUBLISH_FEED_CONTENT_TYPE} rs873m
Should Be Equal As Strings ${resp.status_code} 204
log 'JSON Response Code:'${resp}
@@ -94,23 +96,23 @@ Run Delete Feed
PostCall
[Arguments] ${url} ${data} ${content_type} ${user}
${headers}= Create Dictionary X-ATT-DR-ON-BEHALF-OF=${user} Content-Type=${content_type}
- ${resp}= Evaluate requests.post('${url}',data='${data}', headers=${headers},verify=False) requests
+ ${resp}= Evaluate requests.post('${url}', data='${data}', headers=${headers}, verify=False) requests
[Return] ${resp}
PutCall
[Arguments] ${url} ${data} ${content_type} ${user}
${headers}= Create Dictionary X-ATT-DR-ON-BEHALF-OF=${user} Content-Type=${content_type} Authorization=Basic cnM4NzNtOnJzODczbQ==
- ${resp}= Evaluate requests.put('${url}',data='${data}', headers=${headers},verify=False) requests
+ ${resp}= Evaluate requests.put('${url}', data='${data}', headers=${headers}, verify=False, allow_redirects=False) requests
[Return] ${resp}
GetCall
[Arguments] ${url} ${content_type} ${user}
${headers}= Create Dictionary X-ATT-DR-ON-BEHALF-OF=${user} Content-Type=${content_type}
- ${resp}= Evaluate requests.get('${url}', headers=${headers},verify=False) requests
+ ${resp}= Evaluate requests.get('${url}', headers=${headers}, verify=False) requests
[Return] ${resp}
DeleteCall
[Arguments] ${url} ${user}
${headers}= Create Dictionary X-ATT-DR-ON-BEHALF-OF=${user}
- ${resp}= Evaluate requests.delete('${url}', headers=${headers},verify=False) requests
+ ${resp}= Evaluate requests.delete('${url}', headers=${headers}, verify=False) requests
[Return] ${resp}
diff --git a/tests/policy/suite1/global_properties.robot b/tests/policy/suite1/global_properties.robot
index 60826bbc..e0c816ea 100644
--- a/tests/policy/suite1/global_properties.robot
+++ b/tests/policy/suite1/global_properties.robot
@@ -26,5 +26,5 @@ ${GLOBAL_POLICY_SERVER_URL} https://%{PDP_IP}:8081
${GLOBAL_POLICY_AUTH} dGVzdHBkcDphbHBoYTEyMw==
${GLOBAL_POLICY_CLIENTAUTH} cHl0aG9uOnRlc3Q=
${GLOBAL_POLICY_HEALTHCHECK_URL} https://%{POLICY_IP}:6969
-${GLOBAL_POLICY_USERNAME} healthcheck
-${GLOBAL_POLICY_PASSWORD} zb!XztG34
+${GLOBAL_POLICY_USERNAME} demo@people.osaaf.org
+${GLOBAL_POLICY_PASSWORD} demo123456!
diff --git a/tests/usecases/5G-bulkpm/BulkpmE2E.robot b/tests/usecases/5G-bulkpm/BulkpmE2E.robot
index 154b5139..fcc1cc76 100644
--- a/tests/usecases/5G-bulkpm/BulkpmE2E.robot
+++ b/tests/usecases/5G-bulkpm/BulkpmE2E.robot
@@ -18,6 +18,7 @@ ${TARGETURL_TOPICS} http://${DMAAP_MR_IP}:3904/topics
${TARGETURL_SUBSCR} http://${DMAAP_MR_IP}:3904/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12?timeout=1000
${CLI_EXEC_CLI} curl -k https://${DR_PROV_IP}:8443/internal/prov
${CLI_EXEC_CLI_DFC} docker exec dfc /bin/sh -c "ls /target | grep .gz"
+${CLI_EXEC_CLI_FILECONSUMER} docker exec fileconsumer-node /bin/sh -c "ls /opt/app/subscriber/delivery | grep .gz"
*** Test Cases ***
@@ -27,12 +28,13 @@ Send VES File Ready Event to VES Collector
${evtdata}= Get Event Data From File ${EVENT_DATA_FILE}
${headers}= Create Header From String ${HEADER_STRING}
${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata}
- Sleep 2s
+ Sleep 15s
${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata}
- Sleep 2s
+ Sleep 5s
${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata}
- Sleep 2s
+ Sleep 5s
${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata}
+ Sleep 5s
Log Receive HTTP Status code ${resp.status_code}
Should Be Equal As Strings ${resp.status_code} 202
@@ -51,19 +53,28 @@ Check VES Notification Topic is existing in Message Router
List Should Contain Value ${topics} unauthenticated.VES_NOTIFICATION_OUTPUT
Verify Downloaded PM file from xNF exist on Data File Collector
- [Tags] Bulk_PM_E2E_03
- [Documentation] Check the PM XML file exists on the File Consumer Simulator
- ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_DFC} shell=yes
- Log ${cli_cmd_output.stdout}
- Should Be Equal As Strings ${cli_cmd_output.rc} 0
- Should Contain ${cli_cmd_output.stdout} xNF.pm.xml.gz
+ [Tags] Bulk_PM_E2E_03
+ [Documentation] Check the PM XML file exists on the data file collector
+ ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_DFC} shell=yes
+ Log ${cli_cmd_output.stdout}
+ Should Be Equal As Strings ${cli_cmd_output.rc} 0
+ Should Contain ${cli_cmd_output.stdout} xNF.pm.xml.gz
Verify Default Feed And File Consumer Subscription On Datarouter
- [Tags] Bulk_PM_E2E_04
- [Documentation] Verify Default Feed And File Consumer Subscription On Datarouter
- ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI} shell=yes
- Log ${cli_cmd_output.stdout}
- Should Be Equal As Strings ${cli_cmd_output.rc} 0
- Should Contain ${cli_cmd_output.stdout} https://dmaap-dr-prov/publish/1
- Should Contain ${cli_cmd_output.stdout} http://${DR_SUBSCIBER_IP}:7070 \ No newline at end of file
+ [Tags] Bulk_PM_E2E_04
+ [Documentation] Verify Default Feed And File Consumer Subscription On Datarouter
+ ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI} shell=yes
+ Log ${cli_cmd_output.stdout}
+ Should Be Equal As Strings ${cli_cmd_output.rc} 0
+ Should Contain ${cli_cmd_output.stdout} https://dmaap-dr-prov/publish/1
+ Should Contain ${cli_cmd_output.stdout} http://${DR_SUBSCIBER_IP}:7070
+
+
+Verify Fileconsumer Receive PM file from Data Router
+ [Tags] Bulk_PM_E2E_05
+ [Documentation] Check PM XML file exists on the File Consumer Simulator
+ ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_FILECONSUMER} shell=yes
+ Log ${cli_cmd_output.stdout}
+ Should Be Equal As Strings ${cli_cmd_output.rc} 0
+ Should Contain ${cli_cmd_output.stdout} xNF.pm.xml.gz