Skip to content

Commit 2a45dae

Browse files
phracekfrenzymadness
authored andcommitted
Pull proper postgresql image in case of 3.11-minimal image
Python 3.9-minimal and 3.11-minimal images do not exists in container catalog. So skipping `test_python_imagestream` test. Signed-off-by: Petr "Stone" Hracek <[email protected]>
1 parent edd2b54 commit 2a45dae

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/test-lib-python.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ source "${THISDIR}/test-lib.sh"
1212
source "${THISDIR}/test-lib-openshift.sh"
1313

1414
function ct_pull_or_import_postgresql() {
15-
if [[ "${VERSION}" == "3.11" ]] || [[ "${VERSION}" == "3.12" ]] || [[ "${VERSION}" == "3.12-minimal" ]]; then
15+
if [[ "${VERSION}" == "3.11" ]] || [[ "${VERSION}" == "3.11-minimal" ]] || [[ "${VERSION}" == "3.12" ]] || [[ "${VERSION}" == "3.12-minimal" ]]; then
1616
postgresql_image="quay.io/sclorg/postgresql-12-c8s"
1717
image_short="postgresql:12"
1818
image_tag="${image_short}"
@@ -28,7 +28,7 @@ function ct_pull_or_import_postgresql() {
2828
# Exit in case of failure, because postgresql container is mandatory
2929
ct_pull_image "${postgresql_image}" "true"
3030
else
31-
# Import postgresql-10-centos7 image before running tests on CVP
31+
# Import postgresql-10-c8s image before running tests on CVP
3232
oc import-image "${image_short}:latest" --from="${postgresql_image}:latest" --insecure=true --confirm
3333
# Tag postgresql image to "postgresql:10" which is expected by test suite
3434
oc tag "${image_short}:latest" "${image_tag}"
@@ -37,6 +37,10 @@ function ct_pull_or_import_postgresql() {
3737

3838
# Check the imagestream
3939
function test_python_imagestream() {
40+
if [[ "${VERSIONS}" == "3.9-minimal" ]] || [[ "${VERSIONS}" == "3.11-minimal" ]]; then
41+
echo "Skipping tests for ${VERSIONS}. It is not supported in Container Catalog. Imagestreams do not exist for them."
42+
return 0
43+
fi
4044
local tag="-ubi8"
4145
if [ "${OS}" == "rhel9" ]; then
4246
tag="-ubi9"

0 commit comments

Comments
 (0)