mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 15:58:37 +00:00
Merge pull request #25000 from ihmccreery/skew-client
Add infra to e2e-runner and job configs to allow running tests with a skewed kubectl
This commit is contained in:
commit
7bf10eb502
@ -317,20 +317,37 @@ if [[ "${E2E_UP,,}" == "true" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Allow download & unpack of alternate version of tests, for cross-version & upgrade testing.
|
# Allow download & unpack of alternate version of tests, for cross-version & upgrade testing.
|
||||||
if [[ -n "${JENKINS_PUBLISHED_TEST_VERSION:-}" ]]; then
|
#
|
||||||
|
# JENKINS_PUBLISHED_SKEW_VERSION downloads an alternate version of Kubernetes
|
||||||
|
# for testing, moving the old one to kubernetes_old.
|
||||||
|
#
|
||||||
|
# E2E_UPGRADE_TEST=true triggers a run of the e2e tests, to do something like
|
||||||
|
# upgrade the cluster, before the main test run. It uses
|
||||||
|
# GINKGO_UPGRADE_TESTS_ARGS for the test run.
|
||||||
|
#
|
||||||
|
# JENKINS_USE_SKEW_TESTS=true will run tests from the skewed version rather
|
||||||
|
# than the original version; it is mutuall exclusive with
|
||||||
|
# JENKINS_USE_SKEW_KUBECTL.
|
||||||
|
#
|
||||||
|
# JENKINS_USE_SKEW_KUBECTL=true will use the skewed version of Kubectl; it is
|
||||||
|
# mutually exclusive with JENKINS_USE_SKEW_TESTS.
|
||||||
|
if [[ -n "${JENKINS_PUBLISHED_SKEW_VERSION:-}" ]]; then
|
||||||
cd ..
|
cd ..
|
||||||
mv kubernetes kubernetes_old
|
mv kubernetes kubernetes_old
|
||||||
fetch_published_version_tars "${JENKINS_PUBLISHED_TEST_VERSION}"
|
fetch_published_version_tars "${JENKINS_PUBLISHED_SKEW_VERSION}"
|
||||||
cd kubernetes
|
cd kubernetes
|
||||||
# Upgrade the cluster before running other tests
|
# Upgrade the cluster before running other tests
|
||||||
if [[ "${E2E_UPGRADE_TEST:-}" == "true" ]]; then
|
if [[ "${E2E_UPGRADE_TEST:-}" == "true" ]]; then
|
||||||
# Add a report prefix for the e2e tests so that the tests don't get overwritten when we run
|
# Add a report prefix for the e2e tests so that the tests don't get overwritten when we run
|
||||||
# the rest of the e2es.
|
# the rest of the e2es.
|
||||||
E2E_REPORT_PREFIX='upgrade' e2e_test "${GINKGO_UPGRADE_TEST_ARGS:-}"
|
E2E_REPORT_PREFIX='upgrade' e2e_test "${GINKGO_UPGRADE_TEST_ARGS:-}"
|
||||||
# If JENKINS_USE_OLD_TESTS is set, back out into the old tests now that we've upgraded.
|
fi
|
||||||
if [[ "${JENKINS_USE_OLD_TESTS:-}" == "true" ]]; then
|
if [[ "${JENKINS_USE_SKEW_TESTS:-}" != "true" ]]; then
|
||||||
cd ../kubernetes_old
|
# Back out into the old tests now that we've downloaded & maybe upgraded.
|
||||||
fi
|
cd ../kubernetes_old
|
||||||
|
elif [[ "${JENKINS_USE_SKEW_KUBECTL:-}" == "true" ]]; then
|
||||||
|
# Append kubectl-path of skewed kubectl to test args
|
||||||
|
GINKGO_TEST_ARGS="${GINKGO_TEST_ARGS:-} --kubectl-path=$(pwd)/../kubernetes/cluster/kubectl.sh"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user