diff --git a/ci-operator/step-registry/quay-tests/test-quay-e2e/quay-tests-test-quay-e2e-commands.sh b/ci-operator/step-registry/quay-tests/test-quay-e2e/quay-tests-test-quay-e2e-commands.sh index 16cf6058fd337..836f63e1240b9 100644 --- a/ci-operator/step-registry/quay-tests/test-quay-e2e/quay-tests-test-quay-e2e-commands.sh +++ b/ci-operator/step-registry/quay-tests/test-quay-e2e/quay-tests-test-quay-e2e-commands.sh @@ -3,7 +3,17 @@ set -euo pipefail #Set Kubeconfig: -cd quay-frontend-tests +echo "Quay version is ${QUAY_VERSION}" +QUAY_VERSION_THRESHOLD="3.16" +if [ "$(printf '%s\n%s' "${QUAY_VERSION_THRESHOLD}" "${QUAY_VERSION}" | sort -V | head -n1)" = "${QUAY_VERSION_THRESHOLD}" ]; then + #For Quay versions equal to or higher than 3.16, use the new UI test suite. + cd new-ui-tests +else + #For Quay versions lower than 3.16, use the old UI test suite. + cd quay-frontend-tests +fi +echo "Current testing directory is $(pwd)" + skopeo -v oc version terraform version @@ -95,11 +105,15 @@ quay_route=$(oc get quayregistry quay -n quay-enterprise -o jsonpath='{.status.r echo "The Quay hostname is $quay_route" quay_hostname=${quay_route#*//} echo "The Quay hostname is $quay_hostname" -export CYPRESS_QUAY_ENDPOINT=$quay_hostname -echo "The quay version is ${QUAY_VERSION}" -export CYPRESS_QUAY_VERSION="${QUAY_VERSION}" +if [ "$(printf '%s\n%s' "${QUAY_VERSION_THRESHOLD}" "${QUAY_VERSION}" | sort -V | head -n1)" = "${QUAY_VERSION_THRESHOLD}" ]; then + export CYPRESS_QUAY_ENDPOINT=${quay_hostname} + export CYPRESS_QUAY_ENDPOINT_PROTOCOL="https" + export CYPRESS_QUAY_PROJECT="quay-enterprise" + export CYPRESS_OLD_UI_DISABLED=true +else + export CYPRESS_QUAY_ENDPOINT=${quay_hostname} + export CYPRESS_QUAY_VERSION="${QUAY_VERSION}" +fi NO_COLOR=1 yarn run smoke || true - - diff --git a/ci-operator/step-registry/quay-tests/test-quay-e2e/quay-tests-test-quay-e2e-ref.yaml b/ci-operator/step-registry/quay-tests/test-quay-e2e/quay-tests-test-quay-e2e-ref.yaml index b7743fe6f4066..c60840d2e64b6 100644 --- a/ci-operator/step-registry/quay-tests/test-quay-e2e/quay-tests-test-quay-e2e-ref.yaml +++ b/ci-operator/step-registry/quay-tests/test-quay-e2e/quay-tests-test-quay-e2e-ref.yaml @@ -20,7 +20,7 @@ ref: default: "false" - name: QUAY_VERSION documentation: Quay version - default: "3.14" + default: "3.16" - name: MAP_TESTS default: "false" documentation: Specify whether to update the test suite name for reporting tools