3 # Copyright 2024 Nordix Foundation.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
18 # Script to run the ACM regression test suite in cucumber.
19 # Deploys ACM-R and participants in two different release versions for testing backward compatibility.
23 echo "No release versions provided. Testing ACM-R and participants with the default version"
24 echo "Usage: $0 <acm_release> <compatibility_test_release>"
25 ACM_RELEASE=$(awk -F= '$1 == "defaultbranch" { print $2 }' \
26 "${WORKSPACE}"/.gitreview)
27 PPNT_RELEASE=$ACM_RELEASE
38 if [ -z "${WORKSPACE}" ]; then
39 WORKSPACE=$(git rev-parse --show-toplevel)
44 export SCRIPTS="${WORKSPACE}/csit/resources/scripts"
46 COMPOSE_FOLDER="${WORKSPACE}"/compose
47 REGRESSION_FOLDER="${WORKSPACE}"/policy-regression-tests/policy-clamp-regression/
48 export PROJECT='clamp'
50 # Sign in to nexus3 docker repo
51 docker login -u docker -p docker nexus3.onap.org:10001
55 echo "Configuring docker compose..."
57 source export-ports.sh > /dev/null 2>&1
58 source get-versions-regression.sh $ACM_RELEASE $PPNT_RELEASE > /dev/null 2>&1
60 docker-compose -f docker-compose.yml up -d "policy-clamp-runtime-acm"
62 # wait for the app to start up
63 "${SCRIPTS}"/wait_for_rest.sh localhost "${ACM_PORT}"
65 cd ${REGRESSION_FOLDER}
67 # Invoke the regression test cases