summaryrefslogtreecommitdiffstats
path: root/csit/plans
diff options
context:
space:
mode:
authorJvD_Ericsson <jeff.van.dam@est.tech>2023-12-15 09:22:40 +0000
committerJeff van Dam <jeff.van.dam@est.tech>2023-12-15 14:28:49 +0000
commitcb853790e186fa66487b1a22042345af7163ce34 (patch)
tree334d0b3c7e4473c175678ac9ec7caa67a7f81301 /csit/plans
parent183a22c664b4cd11072901ea3854c56e9256facc (diff)
Move mount node after cps test during CSITs
* Split test plans into cps and ncmp * Check sdnc moved to after cps tests * Moved mounting of node to after cps tests Issue-ID: CPS-2001 Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech> Change-Id: I5a36238d8ee6c91087cd2712c69e169257d48faa
Diffstat (limited to 'csit/plans')
-rw-r--r--csit/plans/cps/sdnc/check_sdnc_mount_node.sh82
-rw-r--r--csit/plans/cps/sdnc/sdnc_setup.sh24
-rwxr-xr-xcsit/plans/cps/setup.sh47
-rw-r--r--csit/plans/cps/testplanCps.txt21
-rw-r--r--csit/plans/cps/testplanNcmp.txt (renamed from csit/plans/cps/testplan.txt)5
5 files changed, 105 insertions, 74 deletions
diff --git a/csit/plans/cps/sdnc/check_sdnc_mount_node.sh b/csit/plans/cps/sdnc/check_sdnc_mount_node.sh
new file mode 100644
index 0000000000..9ea6670769
--- /dev/null
+++ b/csit/plans/cps/sdnc/check_sdnc_mount_node.sh
@@ -0,0 +1,82 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2023 Nordix Foundation
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+
+# WAIT 10 minutes maximum and test every 30 seconds if SDNC is up using HealthCheck API
+TIME_OUT=600
+INTERVAL=30
+TIME=0
+while [ "$TIME" -lt "$TIME_OUT" ]; do
+ response=$(curl --write-out '%{http_code}' --silent --output /dev/null -H "Authorization: Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==" -X POST -H "X-FromAppId: csit-sdnc" -H "X-TransactionId: csit-sdnc" -H "Accept: application/json" -H "Content-Type: application/json" http://$SDNC_HOST:$SDNC_PORT/restconf/operations/SLI-API:healthcheck );
+ echo $response
+
+ if [ "$response" == "200" ]; then
+ echo SDNC started in $TIME seconds
+ break;
+ fi
+
+ echo Sleep: $INTERVAL seconds before testing if SDNC is up. Total wait time up now is: $TIME seconds. Timeout is: $TIME_OUT seconds
+ sleep $INTERVAL
+ TIME=$(($TIME+$INTERVAL))
+done
+
+if [ "$TIME" -ge "$TIME_OUT" ]; then
+ echo TIME OUT: karaf session not started in $TIME_OUT seconds... Could cause problems for testing activities...
+fi
+
+###################### mount pnf-sim as PNFDemo ##########################
+SDNC_TIME_OUT=250
+SDNC_INTERVAL=10
+SDNC_TIME=0
+
+while [ "$SDNC_TIME" -le "$SDNC_TIME_OUT" ]; do
+
+ # Mount netconf node
+ curl --location --request PUT 'http://'$SDNC_HOST:$SDNC_PORT'/restconf/config/network-topology:network-topology/topology/topology-netconf/node/PNFDemo' \
+ --header 'Authorization: Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==' \
+ --header 'Content-Type: application/json' \
+ --data-raw '{
+ "node": [
+ {
+ "node-id": "PNFDemo",
+ "netconf-node-topology:protocol": {
+ "name": "TLS"
+ },
+ "netconf-node-topology:host": "'$LOCAL_IP'",
+ "netconf-node-topology:key-based": {
+ "username": "netconf",
+ "key-id": "ODL_private_key_0"
+ },
+ "netconf-node-topology:port": 6512,
+ "netconf-node-topology:tcp-only": false,
+ "netconf-node-topology:max-connection-attempts": 5
+ }
+ ]
+ }'
+
+ # Verify node has been mounted
+
+ RESPONSE=$( curl --location --request GET 'http://'$SDNC_HOST:$SDNC_PORT'/restconf/config/network-topology:network-topology/topology/topology-netconf' --header 'Authorization: basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==')
+
+ if [[ "$RESPONSE" == *"PNFDemo"* ]]; then
+ echo "Node mounted in $SDNC_TIME"
+ sleep 10
+ break;
+ fi
+
+ sleep $SDNC_INTERVAL
+ SDNC_TIME=$((SDNC_TIME + SDNC_INTERVAL))
+
+done \ No newline at end of file
diff --git a/csit/plans/cps/sdnc/sdnc_setup.sh b/csit/plans/cps/sdnc/sdnc_setup.sh
index 9c17b836b0..61c61fc289 100644
--- a/csit/plans/cps/sdnc/sdnc_setup.sh
+++ b/csit/plans/cps/sdnc/sdnc_setup.sh
@@ -24,26 +24,4 @@
export SDNC_CERT_PATH=$WORKSPACE/plans/cps/sdnc/certs
#start SDNC containers with docker compose and configuration from docker-compose.yml
-docker-compose -f $WORKSPACE/plans/cps/sdnc/docker-compose.yml up -d
-
-# WAIT 10 minutes maximum and test every 30 seconds if SDNC is up using HealthCheck API
-TIME_OUT=600
-INTERVAL=30
-TIME=0
-while [ "$TIME" -lt "$TIME_OUT" ]; do
- response=$(curl --write-out '%{http_code}' --silent --output /dev/null -H "Authorization: Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==" -X POST -H "X-FromAppId: csit-sdnc" -H "X-TransactionId: csit-sdnc" -H "Accept: application/json" -H "Content-Type: application/json" http://$SDNC_HOST:$SDNC_PORT/restconf/operations/SLI-API:healthcheck );
- echo $response
-
- if [ "$response" == "200" ]; then
- echo SDNC started in $TIME seconds
- break;
- fi
-
- echo Sleep: $INTERVAL seconds before testing if SDNC is up. Total wait time up now is: $TIME seconds. Timeout is: $TIME_OUT seconds
- sleep $INTERVAL
- TIME=$(($TIME+$INTERVAL))
-done
-
-if [ "$TIME" -ge "$TIME_OUT" ]; then
- echo TIME OUT: karaf session not started in $TIME_OUT seconds... Could cause problems for testing activities...
-fi \ No newline at end of file
+docker-compose -f $WORKSPACE/plans/cps/sdnc/docker-compose.yml up -d \ No newline at end of file
diff --git a/csit/plans/cps/setup.sh b/csit/plans/cps/setup.sh
index c4e5c153d9..80829eba14 100755
--- a/csit/plans/cps/setup.sh
+++ b/csit/plans/cps/setup.sh
@@ -72,53 +72,6 @@ source $WORKSPACE/plans/cps/sdnc/sdnc_setup.sh
###################### setup pnfsim #####################################
docker-compose -f $WORKSPACE/plans/cps/pnfsim/docker-compose.yml up -d
-# Allow time for netconf-pnp-simulator & SDNC to come up fully
-sleep 30s
-
-###################### mount pnf-sim as PNFDemo ##########################
-SDNC_TIME_OUT=250
-SDNC_INTERVAL=10
-SDNC_TIME=0
-
-while [ "$SDNC_TIME" -le "$SDNC_TIME_OUT" ]; do
-
- # Mount netconf node
- curl --location --request PUT 'http://'$SDNC_HOST:$SDNC_PORT'/restconf/config/network-topology:network-topology/topology/topology-netconf/node/PNFDemo' \
- --header 'Authorization: Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==' \
- --header 'Content-Type: application/json' \
- --data-raw '{
- "node": [
- {
- "node-id": "PNFDemo",
- "netconf-node-topology:protocol": {
- "name": "TLS"
- },
- "netconf-node-topology:host": "'$LOCAL_IP'",
- "netconf-node-topology:key-based": {
- "username": "netconf",
- "key-id": "ODL_private_key_0"
- },
- "netconf-node-topology:port": 6512,
- "netconf-node-topology:tcp-only": false,
- "netconf-node-topology:max-connection-attempts": 5
- }
- ]
- }'
-
- # Verify node has been mounted
-
- RESPONSE=$( curl --location --request GET 'http://'$SDNC_HOST:$SDNC_PORT'/restconf/config/network-topology:network-topology/topology/topology-netconf' --header 'Authorization: basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==')
-
- if [[ "$RESPONSE" == *"PNFDemo"* ]]; then
- echo "Node mounted in $SDNC_TIME"
- break;
- fi
-
- sleep $SDNC_INTERVAL
- SDNC_TIME=$((SDNC_TIME + SDNC_INTERVAL))
-
-done
-
###################### verify ncmp-cps health ##########################
check_health $CPS_CORE_HOST:$CPS_CORE_PORT 'cps-ncmp'
diff --git a/csit/plans/cps/testplanCps.txt b/csit/plans/cps/testplanCps.txt
new file mode 100644
index 0000000000..8b0ad08980
--- /dev/null
+++ b/csit/plans/cps/testplanCps.txt
@@ -0,0 +1,21 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2023 Nordix Foundation
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+
+# Test suites are relative paths under csit/tests/.
+# Place the suites in run order.
+actuator
+cps-admin
+cps-data \ No newline at end of file
diff --git a/csit/plans/cps/testplan.txt b/csit/plans/cps/testplanNcmp.txt
index 45e8381a1e..81c5468618 100644
--- a/csit/plans/cps/testplan.txt
+++ b/csit/plans/cps/testplanNcmp.txt
@@ -1,5 +1,5 @@
# ============LICENSE_START=======================================================
-# Copyright (C) 2021-2023 Nordix Foundation
+# Copyright (C) 2023 Nordix Foundation
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -16,9 +16,6 @@
# Test suites are relative paths under csit/tests/.
# Place the suites in run order.
-actuator
-cps-admin
-cps-data
cps-model-sync
cps-data-sync
cps-subscriptions