openstack-helm/tools/deployment/common/run-helm-tests.sh
Andrii Ostapenko f3ed377cbc Parallelize helm test run for compute-kit
Depends-On: https://review.opendev.org/742499
Change-Id: Iebc74280f5fd6302723caa325603645a2f9755dc
Signed-off-by: Andrii Ostapenko <andrii.ostapenko@att.com>
2020-08-06 00:51:29 +00:00

23 lines
564 B
Bash
Executable File

#!/bin/bash
set -x
APPLICATION=$1
RELEASE_GROUP=${2:-${APPLICATION}}
NAMESPACE=${3:-openstack}
: ${HELM_TESTS_TRIES:=2}
timeout=${OSH_TEST_TIMEOUT:-900}
run_tests() {
# Delete the test pod if it still exists
kubectl delete pods -l application=${APPLICATION},release_group=${RELEASE_GROUP},component=test --namespace=${NAMESPACE} --ignore-not-found
helm test ${APPLICATION} --timeout $timeout
}
for i in $(seq 1 ${HELM_TESTS_TRIES}); do
echo "Run helm tests for ${APPLICATION}. Try #${i}"
run_tests
RC=$?
[ ${RC} -eq "0" ] && break
done
exit ${RC}