From 68aaf7ee667f8994f99b6c66fc8dff7bc4185a7e Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Tue, 27 Sep 2022 12:05:53 +0200 Subject: [PATCH] Enable support for testing postgresql-container in CVP pipeline Signed-off-by: Petr "Stone" Hracek --- test/run-openshift-remote-cluster | 6 +++++- test/test-lib-postgresql.sh | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/test/run-openshift-remote-cluster b/test/run-openshift-remote-cluster index 9bb67139..5ae1bcff 100755 --- a/test/run-openshift-remote-cluster +++ b/test/run-openshift-remote-cluster @@ -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 @@ -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 diff --git a/test/test-lib-postgresql.sh b/test/test-lib-postgresql.sh index 0b12c0f4..7e9074f8 100644 --- a/test/test-lib-postgresql.sh +++ b/test/test-lib-postgresql.sh @@ -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: