From 68fec4eec095c8037c201cd61eca77f2c9a5ce93 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Fri, 5 Dec 2025 10:59:28 +0100 Subject: [PATCH] ginkgo-e2e.sh: support arguments in KUBE_E2E_TEST_ARGS env variable This is useful when invoked through kind's e2e-k8s.sh which doesn't support passing through arguments. The alternatives are: - Extending e2e-k8s.sh to support passing through arguments. - Bespoke copies of e2e-k8s.sh which set additional arguments. Both seem more complex than allowing simple arguments to be passed through the env variable. --- hack/ginkgo-e2e.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hack/ginkgo-e2e.sh b/hack/ginkgo-e2e.sh index 1a4f97f18ab..21848dcd3c0 100755 --- a/hack/ginkgo-e2e.sh +++ b/hack/ginkgo-e2e.sh @@ -213,6 +213,13 @@ fi # is not used. suite_args+=(--report-complete-ginkgo --report-complete-junit) +# Additional e2e.test arguments. Split into individual arguments at spaces. +# For more complex arguments pass additional arguments to the script. +if [[ -n "${KUBE_E2E_TEST_ARGS:-}" ]]; then + # shellcheck disable=SC2206 # Splitting at word boundaries is intentional here. + suite_args+=(${KUBE_E2E_TEST_ARGS}) +fi + # When SIGTERM doesn't reach the E2E test suite binaries, ginkgo will exit # without collecting information from about the currently running and # potentially stuck tests. This seems to happen when Prow shuts down a test