Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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