diff --git a/root/opt/wheels/pip-21.2.3-py3-none-any.whl b/root/opt/wheels/pip-21.2.3-py3-none-any.whl new file mode 100755 index 0000000..a337a36 Binary files /dev/null and b/root/opt/wheels/pip-21.2.3-py3-none-any.whl differ diff --git a/test/django-different-port-test-app/project/settings.py b/test/django-different-port-test-app/project/settings.py index 5827794..79072d0 100644 --- a/test/django-different-port-test-app/project/settings.py +++ b/test/django-different-port-test-app/project/settings.py @@ -10,6 +10,7 @@ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ +import django # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import os @@ -40,16 +41,29 @@ INSTALLED_APPS = ( 'django.contrib.staticfiles', ) -MIDDLEWARE_CLASSES = ( - 'django.contrib.sessions.middleware.SessionMiddleware', - 'django.middleware.common.CommonMiddleware', - 'django.middleware.csrf.CsrfViewMiddleware', - 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', - 'django.contrib.messages.middleware.MessageMiddleware', - 'django.middleware.clickjacking.XFrameOptionsMiddleware', - 'django.middleware.security.SecurityMiddleware', -) +# Django 1 +if django.VERSION[0] == 1: + MIDDLEWARE_CLASSES = ( + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', + 'django.middleware.security.SecurityMiddleware', + ) +else: + # Django 2+ + MIDDLEWARE = ( + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', + 'django.middleware.security.SecurityMiddleware', + ) ROOT_URLCONF = 'project.urls' diff --git a/test/django-different-port-test-app/project/urls.py b/test/django-different-port-test-app/project/urls.py index b5e472c..dde7636 100644 --- a/test/django-different-port-test-app/project/urls.py +++ b/test/django-different-port-test-app/project/urls.py @@ -17,5 +17,5 @@ from django.conf.urls import include, url from django.contrib import admin urlpatterns = [ - url(r'^admin/', include(admin.site.urls)), + url(r'^admin/', admin.site.urls), ] diff --git a/test/django-different-port-test-app/requirements.txt b/test/django-different-port-test-app/requirements.txt index 30eb621..901c5f8 100644 --- a/test/django-different-port-test-app/requirements.txt +++ b/test/django-different-port-test-app/requirements.txt @@ -1 +1,2 @@ -Django==1.11.29 +Django<3; python_version > '3.8' +Django<2; python_version <='3.8' diff --git a/test/django-test-app/project/settings.py b/test/django-test-app/project/settings.py index 5827794..79072d0 100644 --- a/test/django-test-app/project/settings.py +++ b/test/django-test-app/project/settings.py @@ -10,6 +10,7 @@ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ +import django # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import os @@ -40,16 +41,29 @@ INSTALLED_APPS = ( 'django.contrib.staticfiles', ) -MIDDLEWARE_CLASSES = ( - 'django.contrib.sessions.middleware.SessionMiddleware', - 'django.middleware.common.CommonMiddleware', - 'django.middleware.csrf.CsrfViewMiddleware', - 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', - 'django.contrib.messages.middleware.MessageMiddleware', - 'django.middleware.clickjacking.XFrameOptionsMiddleware', - 'django.middleware.security.SecurityMiddleware', -) +# Django 1 +if django.VERSION[0] == 1: + MIDDLEWARE_CLASSES = ( + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', + 'django.middleware.security.SecurityMiddleware', + ) +else: + # Django 2+ + MIDDLEWARE = ( + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', + 'django.middleware.security.SecurityMiddleware', + ) ROOT_URLCONF = 'project.urls' diff --git a/test/django-test-app/project/urls.py b/test/django-test-app/project/urls.py index b5e472c..dde7636 100644 --- a/test/django-test-app/project/urls.py +++ b/test/django-test-app/project/urls.py @@ -17,5 +17,5 @@ from django.conf.urls import include, url from django.contrib import admin urlpatterns = [ - url(r'^admin/', include(admin.site.urls)), + url(r'^admin/', admin.site.urls), ] diff --git a/test/django-test-app/requirements.txt b/test/django-test-app/requirements.txt index 30eb621..901c5f8 100644 --- a/test/django-test-app/requirements.txt +++ b/test/django-test-app/requirements.txt @@ -1 +1,2 @@ -Django==1.11.29 +Django<3; python_version > '3.8' +Django<2; python_version <='3.8' diff --git a/test/imagestreams/python-centos.json b/test/imagestreams/python-centos.json index 1be8538..405c06e 100644 --- a/test/imagestreams/python-centos.json +++ b/test/imagestreams/python-centos.json @@ -1,6 +1,6 @@ { "kind": "ImageStream", - "apiVersion": "v1", + "apiVersion": "image.openshift.io/v1", "metadata": { "name": "python", "annotations": { diff --git a/test/imagestreams/python-rhel-aarch64.json b/test/imagestreams/python-rhel-aarch64.json index a390935..f1400c5 100644 --- a/test/imagestreams/python-rhel-aarch64.json +++ b/test/imagestreams/python-rhel-aarch64.json @@ -1,6 +1,6 @@ { "kind": "ImageStream", - "apiVersion": "v1", + "apiVersion": "image.openshift.io/v1", "metadata": { "name": "python", "annotations": { diff --git a/test/imagestreams/python-rhel.json b/test/imagestreams/python-rhel.json index 7522c80..92f545f 100644 --- a/test/imagestreams/python-rhel.json +++ b/test/imagestreams/python-rhel.json @@ -1,6 +1,6 @@ { "kind": "ImageStream", - "apiVersion": "v1", + "apiVersion": "image.openshift.io/v1", "metadata": { "name": "python", "annotations": { diff --git a/test/test-lib-openshift.sh b/test/test-lib-openshift.sh index b98e628..96cae8d 100644 --- a/test/test-lib-openshift.sh +++ b/test/test-lib-openshift.sh @@ -14,6 +14,7 @@ OS_TESTSUITE_RESULT=1 OS_CLUSTER_STARTED_BY_TEST=0 function ct_os_cleanup() { + echo "${test_short_summary:-}" if [ $OS_TESTSUITE_RESULT -eq 0 ] ; then # shellcheck disable=SC2153 echo "OpenShift tests for ${IMAGE_NAME} succeeded." @@ -957,8 +958,9 @@ ct_os_test_image_update() { local old_image=$1; shift local istag=$1; shift local check_function=$1; shift - local service_name=${image_name##*/} local ip="" check_command_exp="" + local image_name_no_namespace=${image_name##*/} + local service_name="${image_name_no_namespace%%:*}-testing" echo "Running image update test for: $image_name" # shellcheck disable=SC2119 diff --git a/test/test-lib.sh b/test/test-lib.sh index 42f22ba..e954053 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -61,9 +61,9 @@ function ct_enable_cleanup() { # Function returns either 0 in case of pull was successful # Or the test suite exit with 1 in case of pull error function ct_pull_image() { - local image_name="$1"; shift - local exit=${1:-"false"}; shift - local loops=${1:-10}; shift + local image_name="$1"; [[ $# -gt 0 ]] && shift + local exit_variable=${1:-"false"}; [[ $# -gt 0 ]] && shift + local loops=${1:-10} local loop=0 # Let's try to pull image. @@ -84,7 +84,7 @@ function ct_pull_image() { echo "Pulling of image $image_name failed $loops times in a row. Giving up." echo "!!! ERROR with pulling image $image_name !!!!" # shellcheck disable=SC2268 - if [[ x"$exit" == x"false" ]]; then + if [[ x"$exit_variable" == x"false" ]]; then return 1 else exit 1