From 051ecde0b1899487c1101e4087b902c70ce740a7 Mon Sep 17 00:00:00 2001 From: Petr Khartskhaev Date: Mon, 9 Feb 2026 16:36:20 +0100 Subject: [PATCH] Disable and remove openshift-4 bash tests --- .github/workflows/container-tests.yml | 2 +- test/run-openshift-remote-cluster | 44 -------------- test/test-lib-nginx.sh | 83 --------------------------- test/test-lib-openshift.sh | 1 - test/test-lib-remote-openshift.sh | 1 - test/test-openshift.yaml | 1 - 6 files changed, 1 insertion(+), 131 deletions(-) delete mode 100755 test/run-openshift-remote-cluster delete mode 100644 test/test-lib-nginx.sh delete mode 120000 test/test-lib-openshift.sh delete mode 120000 test/test-lib-remote-openshift.sh delete mode 120000 test/test-openshift.yaml diff --git a/.github/workflows/container-tests.yml b/.github/workflows/container-tests.yml index bdbc6cd0..7be3ffb9 100644 --- a/.github/workflows/container-tests.yml +++ b/.github/workflows/container-tests.yml @@ -10,7 +10,7 @@ jobs: needs: check-readme uses: "sclorg/ci-actions/.github/workflows/container-tests.yml@main" with: - enabled-tests: '["container","container-pytest","openshift-4","openshift-pytest"]' + enabled-tests: '["container","container-pytest","openshift-pytest"]' versions: '[ "1.20", "1.22", "1.22-micro", "1.24", "1.26" ]' openshift-versions: '[ "1.20", "1.22", "1.22-micro", "1.24", "1.26" ]' secrets: inherit diff --git a/test/run-openshift-remote-cluster b/test/run-openshift-remote-cluster deleted file mode 100755 index b5e40178..00000000 --- a/test/run-openshift-remote-cluster +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash -# -# Test the nginx S2I image in OpenShift (remote cluster) -# -# IMAGE_NAME specifies a name of the candidate image used for testing. -# The image has to be available before this script is executed. -# VERSION specifies the major version of the nginx runtime in format of X.Y -# OS specifies RHEL version (e.g. OS=rhel8) -# - -THISDIR=$(dirname ${BASH_SOURCE[0]}) - -source "${THISDIR}/test-lib-nginx.sh" -source "${THISDIR}/test-lib-remote-openshift.sh" - -TEST_LIST="\ -test_nginx_integration -test_nginx_local_example -test_nginx_remote_example -test_nginx_template_from_example_app -test_nginx_imagestream -test_latest_imagestreams -" - -trap ct_os_cleanup EXIT SIGINT - -ct_os_set_ocp4 || exit $OC_ERR - -ct_os_check_compulsory_vars || exit $OC_ERR - -ct_os_tag_image_for_cvp "nginx" - -ct_os_check_login || exit $OC_ERR - - -set -u - -# For testing on OpenShift 4 we use internal registry -export CT_OCP4_TEST=true - -TEST_SUMMARY='' -TEST_SET=${TESTS:-$TEST_LIST} ct_run_tests_from_testset "openshift-remote-cluster" -# vim: set tabstop=2:shiftwidth=2:expandtab: - diff --git a/test/test-lib-nginx.sh b/test/test-lib-nginx.sh deleted file mode 100644 index 4ae32065..00000000 --- a/test/test-lib-nginx.sh +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/bash -# -# Functions for tests for the nginx image in OpenShift. -# -# IMAGE_NAME specifies a name of the candidate image used for testing. -# 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" - -function test_nginx_integration() { - ct_os_test_s2i_app "${IMAGE_NAME}" \ - "https://github.com/sclorg/nginx-container.git" \ - "examples/${VERSION}/test-app" \ - "Test NGINX passed" -} - -# Check the imagestream -function test_nginx_imagestream() { - # Check if the current version is already GA - # This directory is cloned from TMT plan repo 'sclorg-tmt-plans' - local devel_file="/root/sclorg-tmt-plans/devel_images" - if [ -f "${devel_file}" ]; then - if grep -q "${OS}=nginx-container=${VERSION}" "$devel_file" ; then - echo "This version is currently developed, so skipping this test." - return - fi - fi - ct_os_test_image_stream_s2i "${THISDIR}/imagestreams/nginx-${OS//[0-9]/}.json" "${IMAGE_NAME}" \ - "https://github.com/sclorg/nginx-container.git" \ - "examples/${VERSION}/test-app" \ - "Test NGINX passed" -} - -function test_nginx_local_example() { - # test local app - ct_os_test_s2i_app ${IMAGE_NAME} "${THISDIR}/test-app" . 'Test NGINX passed' -} - -function test_nginx_remote_example() { - # TODO: branch should be changed to master, once code in example app - # stabilizes on with referencing latest version - BRANCH_TO_TEST=master - # test remote example app - ct_os_test_s2i_app "${IMAGE_NAME}" \ - "https://github.com/sclorg/nginx-ex.git#${BRANCH_TO_TEST}" \ - . \ - 'Welcome to your static nginx application on OpenShift' -} - -function test_nginx_template_from_example_app() { - BRANCH_TO_TEST=master - # test template from the example app - ct_os_test_template_app "${IMAGE_NAME}" \ - "https://raw.githubusercontent.com/sclorg/nginx-ex/${BRANCH_TO_TEST}/openshift/templates/nginx.json" \ - nginx \ - 'Welcome to your static nginx application on OpenShift' \ - 8080 http 200 "-p SOURCE_REPOSITORY_REF=${BRANCH_TO_TEST} -p NGINX_VERSION=${VERSION} -p NAME=nginx-testing" - -} - -function test_latest_imagestreams() { - local result=1 - if [[ "${VERSION}" == *"micro"* ]]; then - echo "Do not check 'micro' imagestreams. Only main versions." - return 0 - fi - if [[ "${OS}" == "rhel8" ]]; then - echo "Do not check the latest version in imagestreams for RHEL8. It does not contain the latest version." - return 0 - fi - echo "Testing the latest version in imagestreams" - pushd "${THISDIR}/../.." >/dev/null || return 1 - ct_check_latest_imagestreams - result=$? - popd >/dev/null || return 1 - return $result -} - -# vim: set tabstop=2:shiftwidth=2:expandtab: diff --git a/test/test-lib-openshift.sh b/test/test-lib-openshift.sh deleted file mode 120000 index f48003b8..00000000 --- a/test/test-lib-openshift.sh +++ /dev/null @@ -1 +0,0 @@ -../common/test-lib-openshift.sh \ No newline at end of file diff --git a/test/test-lib-remote-openshift.sh b/test/test-lib-remote-openshift.sh deleted file mode 120000 index 15003d84..00000000 --- a/test/test-lib-remote-openshift.sh +++ /dev/null @@ -1 +0,0 @@ -../common/test-lib-remote-openshift.sh \ No newline at end of file diff --git a/test/test-openshift.yaml b/test/test-openshift.yaml deleted file mode 120000 index 9316d8fa..00000000 --- a/test/test-openshift.yaml +++ /dev/null @@ -1 +0,0 @@ -../common/test-openshift.yaml \ No newline at end of file