diff --git a/test/run b/test/run index e374dca..3a51db2 100755 --- a/test/run +++ b/test/run @@ -9,8 +9,8 @@ declare -a WEB_APPS=({gunicorn-config-different-port,gunicorn-different-port,django-different-port,standalone,setup,setup-cfg,setup-requirements,django,numpy,app-home,npm-virtualenv-uwsgi,locale,mod-wsgi,pipenv,pipenv-and-micropipenv-should-fail,pin-pipenv-version,app-module,micropipenv,micropipenv-requirements}-test-app) # TODO: Make command compatible for Mac users -test_dir="$(readlink -zf $(dirname "${BASH_SOURCE[0]}"))" -image_dir=$(readlink -zf ${test_dir}/..) +test_dir="$(readlink -f $(dirname "${BASH_SOURCE[0]}"))" +image_dir=$(readlink -f ${test_dir}/..) test_short_summary='' TESTSUITE_RESULT=0 diff --git a/test/run-openshift b/test/run-openshift index 76d36e8..b66294e 100755 --- a/test/run-openshift +++ b/test/run-openshift @@ -24,6 +24,9 @@ test_latest_imagestreams() { ct_check_latest_imagestreams popd >/dev/null } +# Pull image before going throw tests +# Exit in case of failure +ct_pull_image "quay.io/centos7/postgresql-10-centos7" "true" ct_os_check_compulsory_vars @@ -38,7 +41,6 @@ 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 diff --git a/test/run-openshift-remote-cluster b/test/run-openshift-remote-cluster index b810752..80e9a9c 100755 --- a/test/run-openshift-remote-cluster +++ b/test/run-openshift-remote-cluster @@ -14,8 +14,12 @@ source "${THISDIR}/test-lib-python.sh" source "${THISDIR}/test-lib-remote-openshift.sh" set -eo nounset -ct_os_set_ocp4 +# Pull image before going throw tests +# Exit in case of failure +ct_pull_image "quay.io/centos7/postgresql-10-centos7" "true" + +ct_os_set_ocp4 trap ct_os_cleanup EXIT SIGINT @@ -36,15 +40,27 @@ https://raw.githubusercontent.com/openshift/origin/master/examples/quickstarts/d fi ct_os_test_s2i_app "${IMAGE_NAME}" "https://github.com/sclorg/s2i-python-container.git" "examples/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' + +if [[ ${VERSION} == "2.7" ]] || docker inspect ${IMAGE_NAME} --format "{{.Config.Env}}" | tr " " "\n" | grep -q "^PLATFORM=el7"; then + django_example_repo_url="https://github.com/sclorg/django-ex.git" +else + django_example_repo_url="https://github.com/sclorg/django-ex.git#2.2.x" +fi + +ct_os_test_s2i_app "${IMAGE_NAME}" "${django_example_repo_url}" . 'Welcome to your Django application on OpenShift' for template in $EPHEMERAL_TEMPLATES; do + if [[ ${VERSION} == "2.7" ]] || docker inspect ${IMAGE_NAME} --format "{{.Config.Env}}" | tr " " "\n" | grep -q "^PLATFORM=el7"; then + branch="master" + else + branch="2.2.x" + fi 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=10 -p NAME=python-testing" \ - "rhscl/postgresql-10-rhel7|postgresql:10" + 8080 http 200 "-p SOURCE_REPOSITORY_REF=$branch -p PYTHON_VERSION=${VERSION} -p POSTGRESQL_VERSION=10 -p NAME=python-testing" \ + "quay.io/centos7/postgresql-10-centos7|postgresql:10" done # Check the imagestream diff --git a/test/test-lib-python.sh b/test/test-lib-python.sh index 25a9c1e..09f0baf 100644 --- a/test/test-lib-python.sh +++ b/test/test-lib-python.sh @@ -24,7 +24,7 @@ function test_python_imagestream() { 'python' \ 'Welcome to your Django application on OpenShift' \ 8080 http 200 "-p SOURCE_REPOSITORY_REF=master -p PYTHON_VERSION=${VERSION} -p POSTGRESQL_VERSION=10 -p NAME=python-testing" \ - "rhscl/postgresql-10-rhel7|postgresql:10" + "quay.io/centos7/postgresql-10-centos7|postgresql:10" } # vim: set tabstop=2:shiftwidth=2:expandtab: