aboutsummaryrefslogtreecommitdiffstats
path: root/csit/run-project-csit.sh
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2022-09-01 12:05:47 +0100
committerliamfallon <liam.fallon@est.tech>2022-09-05 10:19:02 +0100
commitfaac45b578a29078700b5ea003c69cedc1a17b5f (patch)
treef2a079358441401e50c9933255122796b2134ea6 /csit/run-project-csit.sh
parentff82245b200616cf30a6f6cd4d1e5305ae3d90ef (diff)
Convert CSIT tests to use HTTP rather than HTTPS
This commit converts the CSITs from HTTPS to HTTP. It also does some refactoring and didying up on the CSIT environment. Issue-ID: POLICY-4338 Change-Id: Ie19908a8d2a457df3ae5f4e490d5528889f395c8 Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'csit/run-project-csit.sh')
-rwxr-xr-xcsit/run-project-csit.sh59
1 files changed, 31 insertions, 28 deletions
diff --git a/csit/run-project-csit.sh b/csit/run-project-csit.sh
index f09af486..b5ddc8ed 100755
--- a/csit/run-project-csit.sh
+++ b/csit/run-project-csit.sh
@@ -51,16 +51,23 @@ function on_exit(){
trap on_exit EXIT
function docker_stats(){
- #General memory details
- echo "> top -bn1 | head -3"
- top -bn1 | head -3
- echo
-
- echo "> free -h"
- free -h
- echo
+ # General memory details
+ if [ "$(uname -s)" == "Darwin" ]
+ then
+ echo "> top -l1 | head -10"
+ sh -c "top -l1 | head -10"
+ echo
+ else
+ echo "> top -bn1 | head -3"
+ sh -c "top -bn1 | head -3"
+ echo
+
+ echo "> free -h"
+ sh -c "free -h"
+ echo
+ fi
- #Memory details per Docker
+ # Memory details per Docker
echo "> docker ps"
docker ps
echo
@@ -120,6 +127,19 @@ function source_safely() {
# main
#
+if $(docker images | grep -q "onap\/policy-api")
+then
+ echo where
+ export CONTAINER_LOCATION=$(
+ docker images |
+ grep onap/policy-api |
+ head -1 |
+ sed 's/onap\/policy-api.*$//'
+ )
+else
+ export CONTAINER_LOCATION="nexus3.onap.org:10001/"
+fi
+
# set and save options for quick failure
harden_set && save_set
@@ -145,10 +165,6 @@ export ROBOT_VARIABLES=
# get the plan from git clone
source "${SCRIPTS}"/get-branch.sh
-# Prepare configuration files
-cd "${WORKSPACE}/csit"
-python3 ./prepare-config-files.py --https=true
-
export PROJECT="${1}"
cd ${WORKSPACE}
@@ -165,25 +181,12 @@ source_safely "${SCRIPTS}/prepare-csit.sh"
# Activate the virtualenv containing all the required libraries installed by prepare-csit.sh
source_safely "${ROBOT_VENV}/bin/activate"
-WORKDIR=$(mktemp -d --suffix=-robot-workdir)
+WORKDIR=$(mktemp -d)
cd "${WORKDIR}"
# Sign in to nexus3 docker repo
docker login -u docker -p docker nexus3.onap.org:10001
-# Generate truststore and keystore to be used by repos
-${SCRIPTS}/gen_truststore.sh
-${SCRIPTS}/gen_keystore.sh
-cp ${SCRIPTS}/config/ks.jks ${SCRIPTS}/config/drools/custom/policy-keystore
-cp ${SCRIPTS}/config/ks.jks ${SCRIPTS}/config/drools-apps/custom/policy-keystore
-cp ${SCRIPTS}/config/policy-truststore \
- ${SCRIPTS}/config/drools/custom/policy-truststore
-cp ${SCRIPTS}/config/policy-truststore \
- ${SCRIPTS}/config/drools-apps/custom/policy-truststore
-chmod 644 \
- ${SCRIPTS}/config/drools/custom/policy-* \
- ${SCRIPTS}/config/drools-apps/custom/policy-*
-
# Run setup script plan if it exists
cd "${TESTPLANDIR}/plans/"
SETUP="${TESTPLANDIR}/plans/setup.sh"
@@ -200,7 +203,7 @@ cd "${WORKDIR}"
echo "Reading the testplan:"
cat "${TESTPLANDIR}/plans/testplan.txt" | egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' | sed "s|^|${TESTPLANDIR}/tests/|" > testplan.txt
cat testplan.txt
-SUITES=$( xargs -a testplan.txt )
+SUITES=$( xargs < testplan.txt )
echo ROBOT_VARIABLES="${ROBOT_VARIABLES}"
echo "Starting Robot test suites ${SUITES} ..."