@@ -12,10 +12,7 @@ source "${THISDIR}/test-lib.sh"
12
12
source " ${THISDIR} /test-lib-openshift.sh"
13
13
14
14
function ct_pull_or_import_postgresql() {
15
- if [[ " ${VERSION} " == * " minimal" * ]]; then
16
- VERSION=$( echo " ${VERSION} " | cut -d " -" -f 1)
17
- fi
18
- if [[ " ${VERSION} " == " 3.11" ]] || [[ " ${VERSION} " == " 3.12" ]]; then
15
+ if [[ " ${VERSION} " == " 3.11" ]] || [[ " ${VERSION} " == " 3.12" ]] || [[ " ${VERSION} " == " 3.12-minimal" ]]; then
19
16
postgresql_image=" quay.io/sclorg/postgresql-12-c8s"
20
17
image_short=" postgresql:12"
21
18
image_tag=" ${image_short} "
@@ -46,8 +43,9 @@ function test_python_imagestream() {
46
43
elif [ " ${OS} " == " rhel10" ]; then
47
44
tag=" -ubi10"
48
45
fi
46
+
49
47
# On RHEL10 we have only 3.12-minimal image
50
- if [[ " ${VERSION} " == " 3.11" ]] || [[ " ${VERSION} " == " 3.12" ]] && [[ " ${VERSION} " == " 3.12-minimal" ]]; then
48
+ if [[ " ${VERSION} " == " 3.11" ]] || [[ " ${VERSION} " == " 3.12" ]] || [[ " ${VERSION} " == " 3.12-minimal" ]]; then
51
49
branch=" 4.2.x"
52
50
postgresql_image=" quay.io/sclorg/postgresql-12-c8s|postgresql:12"
53
51
postgresql_version=" 12"
@@ -78,10 +76,11 @@ function test_python_s2i_app_ex_standalone() {
78
76
}
79
77
80
78
function test_python_s2i_app_ex() {
79
+ local NEW_VERSION=" ${VERSION} "
81
80
if [[ " ${VERSION} " == * " minimal" * ]]; then
82
- VERSION =$( echo " ${VERSION} " | cut -d " -" -f 1)
81
+ NEW_VERSION =$( echo " ${VERSION} " | cut -d " -" -f 1)
83
82
fi
84
- if [[ " ${VERSION } " == " 3.11" ]] || [[ " ${VERSION } " == " 3.12" ]]; then
83
+ if [[ " ${NEW_VERSION } " == " 3.11" ]] || [[ " ${NEW_VERSION } " == " 3.12" ]] || [[ " ${NEW_VERSION} " == " 3.12-minimal " ]]; then
85
84
branch=" 4.2.x"
86
85
else
87
86
branch=" 2.2.x"
@@ -101,10 +100,11 @@ function test_python_s2i_templates() {
101
100
django-postgresql.json \
102
101
django-postgresql-persistent.json"
103
102
fi
103
+ local NEW_VERSION=" ${VERSION} "
104
104
if [[ " ${VERSION} " == * " minimal" * ]]; then
105
- VERSION =$( echo " ${VERSION} " | cut -d " -" -f 1)
105
+ NEW_VERSION =$( echo " ${VERSION} " | cut -d " -" -f 1)
106
106
fi
107
- if [[ " ${VERSION } " == " 3.11" ]] || [[ " ${VERSION } " == " 3.12" ]]; then
107
+ if [[ " ${NEW_VERSION } " == " 3.11" ]] || [[ " ${NEW_VERSION } " == " 3.12" ]]; then
108
108
postgresql_image=" quay.io/sclorg/postgresql-12-c8s|postgresql:12"
109
109
postgresql_version=" 12"
110
110
branch=" 4.2.x"
@@ -119,7 +119,7 @@ django-postgresql-persistent.json"
119
119
" https://raw.githubusercontent.com/sclorg/django-ex/${branch} /openshift/templates/${template} " \
120
120
python \
121
121
' Welcome to your Django application on OpenShift' \
122
- 8080 http 200 " -p SOURCE_REPOSITORY_REF=$branch -p PYTHON_VERSION=${VERSION } -p POSTGRESQL_VERSION=${postgresql_version} -p NAME=python-testing" \
122
+ 8080 http 200 " -p SOURCE_REPOSITORY_REF=$branch -p PYTHON_VERSION=${NEW_VERSION } -p POSTGRESQL_VERSION=${postgresql_version} -p NAME=python-testing" \
123
123
" ${postgresql_image} "
124
124
done
125
125
}
0 commit comments