forked from sclorg/s2i-python-container
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-openshift
More file actions
executable file
·38 lines (29 loc) · 1.51 KB
/
Copy pathrun-openshift
File metadata and controls
executable file
·38 lines (29 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
#
# Test the Python image in the OpenShift.
#
# IMAGE_NAME specifies a name of the candidate image used for testing.
# VERSION specifies a version of the python in the candidate image.
# The image has to be available before this script is executed.
THISDIR=$(dirname ${BASH_SOURCE[0]})
source "${THISDIR}/test-lib.sh"
source "${THISDIR}/test-lib-openshift.sh"
set -exo nounset
test -n "${IMAGE_NAME-}" || false 'make sure $IMAGE_NAME is defined'
test -n "${VERSION-}" || false 'make sure $VERSION is defined'
if [ -z "${EPHEMERAL_TEMPLATES:-}" ]; then
EPHEMERAL_TEMPLATES="
https://raw.githubusercontent.com/sclorg/django-ex/master/openshift/templates/django-postgresql.json \
https://raw.githubusercontent.com/openshift/origin/master/examples/quickstarts/django-postgresql.json"
fi
ct_os_cluster_up
ct_os_test_s2i_app "${IMAGE_NAME}" "${THISDIR}/standalone-test-app" . "Hello World from standalone WSGI application!"
ct_os_test_s2i_app "${IMAGE_NAME}" "https://github.com/sclorg/django-ex.git" . 'Welcome to your Django application on OpenShift'
for template in $EPHEMERAL_TEMPLATES; do
ct_os_test_template_app "$IMAGE_NAME" \
"$template" \
python \
'Welcome to your Django application on OpenShift' \
8080 http 200 "-p SOURCE_REPOSITORY_REF=master -p PYTHON_VERSION=${VERSION} -p POSTGRESQL_VERSION=9.6 -p NAME=python-testing" \
"centos/postgresql-96-centos7|postgresql:9.6"
done