Skip to content

Commit

Permalink
Merge pull request sclorg#447 from zmiklank/run_all_openshift_tests_e…
Browse files Browse the repository at this point in the history
…ven_if_one_fails

run all openshift4 tests even when one fails
  • Loading branch information
phracek authored Jun 30, 2022
2 parents ca793c9 + 4ab07f2 commit 52a2c50
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
19 changes: 9 additions & 10 deletions test/run-openshift-remote-cluster
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,26 @@
THISDIR=$(dirname ${BASH_SOURCE[0]})

source ${THISDIR}/test-lib-postgresql.sh

set -eo nounset
TEST_LIST="\
test_postgresql_integration
test_postgresql_imagestream
"

trap ct_os_cleanup EXIT SIGINT

ct_os_set_ocp4

ct_os_check_compulsory_vars

oc status || false "It looks like oc is not properly logged in."
ct_os_check_login || exit 1

set -u

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

# Check the template
test_postgresql_integration "${IMAGE_NAME}"

# Check the imagestream
test_postgresql_imagestream

OS_TESTSUITE_RESULT=0
TEST_SUMMARY=''
TEST_SET=${TESTS:-$TEST_LIST} ct_run_tests_from_testset "openshift-remote-cluster"

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

3 changes: 1 addition & 2 deletions test/test-lib-postgresql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ source "${THISDIR}"/test-lib-openshift.sh
source "${THISDIR}"/test-lib-remote-openshift.sh

function test_postgresql_integration() {
local image_name=$1
local service_name=postgresql
ct_os_template_exists postgresql-ephemeral && t=postgresql-ephemeral || t=postgresql-persistent
ct_os_test_template_app_func "${image_name}" \
ct_os_test_template_app_func "${IMAGE_NAME}" \
"${t}" \
"${service_name}" \
"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" \
Expand Down

0 comments on commit 52a2c50

Please sign in to comment.