Skip to content

Commit 52a2c50

Browse files
authored
Merge pull request #447 from zmiklank/run_all_openshift_tests_even_if_one_fails
run all openshift4 tests even when one fails
2 parents ca793c9 + 4ab07f2 commit 52a2c50

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

test/run-openshift-remote-cluster

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,26 @@
1111
THISDIR=$(dirname ${BASH_SOURCE[0]})
1212

1313
source ${THISDIR}/test-lib-postgresql.sh
14-
15-
set -eo nounset
14+
TEST_LIST="\
15+
test_postgresql_integration
16+
test_postgresql_imagestream
17+
"
1618

1719
trap ct_os_cleanup EXIT SIGINT
1820

1921
ct_os_set_ocp4
2022

2123
ct_os_check_compulsory_vars
2224

23-
oc status || false "It looks like oc is not properly logged in."
25+
ct_os_check_login || exit 1
26+
27+
set -u
2428

2529
# For testing on OpenShift 4 we use internal registry
2630
export CT_OCP4_TEST=true
2731

28-
# Check the template
29-
test_postgresql_integration "${IMAGE_NAME}"
30-
31-
# Check the imagestream
32-
test_postgresql_imagestream
33-
34-
OS_TESTSUITE_RESULT=0
32+
TEST_SUMMARY=''
33+
TEST_SET=${TESTS:-$TEST_LIST} ct_run_tests_from_testset "openshift-remote-cluster"
3534

3635
# vim: set tabstop=2:shiftwidth=2:expandtab:
3736

test/test-lib-postgresql.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ source "${THISDIR}"/test-lib-openshift.sh
1313
source "${THISDIR}"/test-lib-remote-openshift.sh
1414

1515
function test_postgresql_integration() {
16-
local image_name=$1
1716
local service_name=postgresql
1817
ct_os_template_exists postgresql-ephemeral && t=postgresql-ephemeral || t=postgresql-persistent
19-
ct_os_test_template_app_func "${image_name}" \
18+
ct_os_test_template_app_func "${IMAGE_NAME}" \
2019
"${t}" \
2120
"${service_name}" \
2221
"ct_os_check_cmd_internal '<SAME_IMAGE>' '${service_name}-testing' 'PGPASSWORD=testp pg_isready -t 15 -h <IP> -U testu -d testdb' 'accepting connections' 120" \

0 commit comments

Comments
 (0)