summaryrefslogtreecommitdiffstats
path: root/csit
diff options
context:
space:
mode:
authorrameshiyer27 <ramesh.murugan.iyer@est.tech>2024-02-14 10:13:16 +0000
committerrameshiyer27 <ramesh.murugan.iyer@est.tech>2024-02-28 10:44:36 +0000
commitb15eda6e03133862f071a6dc0127c3bc660aad1f (patch)
tree2465a306b7d3d5a052187e91034bf5382bbd120a /csit
parentfbfc234895c48282e2e92b44c8c8b49745e81745 (diff)
Add ACM regression test suite
Issue-ID: POLICY-4920 Signed-off-by: rameshiyer27 <ramesh.murugan.iyer@est.tech> Change-Id: Icf042b71a3faa2a83dc32dde57ddaf3d66e599d7
Diffstat (limited to 'csit')
-rwxr-xr-xcsit/run-acm-regression.sh68
1 files changed, 68 insertions, 0 deletions
diff --git a/csit/run-acm-regression.sh b/csit/run-acm-regression.sh
new file mode 100755
index 00000000..615e4a94
--- /dev/null
+++ b/csit/run-acm-regression.sh
@@ -0,0 +1,68 @@
+#!/bin/bash
+#
+# Copyright 2024 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.
+#
+
+# Script to run the ACM regression test suite in cucumber.
+# Deploys ACM-R and participants in two different release versions for testing backward compatibility.
+
+if [ $# -eq 0 ]
+then
+ echo "No release versions provided. Testing ACM-R and participants with the default version"
+ echo "Usage: $0 <acm_release> <compatibility_test_release>"
+ ACM_RELEASE=$(awk -F= '$1 == "defaultbranch" { print $2 }' \
+ "${WORKSPACE}"/.gitreview)
+ PPNT_RELEASE=$ACM_RELEASE
+fi
+
+if [ $1 ]; then
+ ACM_RELEASE=$1
+fi
+
+if [ $2 ]; then
+ PPNT_RELEASE=$2
+fi
+
+if [ -z "${WORKSPACE}" ]; then
+ WORKSPACE=$(git rev-parse --show-toplevel)
+ export WORKSPACE
+fi
+
+
+export SCRIPTS="${WORKSPACE}/csit/resources/scripts"
+
+COMPOSE_FOLDER="${WORKSPACE}"/compose
+REGRESSION_FOLDER="${WORKSPACE}"/policy-regression-tests/policy-clamp-regression/
+export PROJECT='clamp'
+
+# Sign in to nexus3 docker repo
+docker login -u docker -p docker nexus3.onap.org:10001
+
+cd ${COMPOSE_FOLDER}
+
+echo "Configuring docker compose..."
+
+source export-ports.sh > /dev/null 2>&1
+source get-versions-regression.sh $ACM_RELEASE $PPNT_RELEASE > /dev/null 2>&1
+
+docker-compose -f docker-compose.yml up -d "policy-clamp-runtime-acm"
+
+# wait for the app to start up
+"${SCRIPTS}"/wait_for_rest.sh localhost "${ACM_PORT}"
+
+cd ${REGRESSION_FOLDER}
+
+# Invoke the regression test cases
+mvn clean test \ No newline at end of file