Skip to content

Commit

Permalink
Enable support for testing postgresql-container in CVP pipeline
Browse files Browse the repository at this point in the history
Signed-off-by: Petr "Stone" Hracek <[email protected]>
  • Loading branch information
phracek committed Sep 27, 2022
1 parent c71aa4d commit 68aaf7e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion test/run-openshift-remote-cluster
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@

THISDIR=$(dirname ${BASH_SOURCE[0]})

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

TEST_LIST="\
test_postgresql_integration
test_postgresql_imagestream
Expand All @@ -24,6 +26,8 @@ ct_os_check_compulsory_vars

ct_os_check_login || exit 1

ct_os_tag_image_for_cvp "postgresql"

set -u

# For testing on OpenShift 4 we use internal registry
Expand Down
4 changes: 2 additions & 2 deletions test/test-lib-postgresql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ function test_postgresql_integration() {
# Check the imagestream
function test_postgresql_imagestream() {
case ${OS} in
rhel7|centos7) ;;
rhel7|centos7|rhel8) ;;
*) echo "Imagestream testing not supported for $OS environment." ; return 0 ;;
esac
local tag="-el7"
if [ "${OS}" == "rhel8" ]; then
tag="-el8"
fi
ct_os_test_image_stream_template "${THISDIR}/../imagestreams/postgresql-${OS%[0-9]*}.json" "${THISDIR}/../examples/postgresql-ephemeral-template.json" postgresql "-p POSTGRESQL_VERSION=${VERSION}${tag}"
ct_os_test_image_stream_template "${THISDIR}/imagestreams/postgresql-${OS%[0-9]*}.json" "${THISDIR}/examples/postgresql-ephemeral-template.json" postgresql "-p POSTGRESQL_VERSION=${VERSION}${tag}"
}

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

0 comments on commit 68aaf7e

Please sign in to comment.