diff --git a/hack/prepare-envtest.sh b/hack/prepare-envtest.sh index 327db639efc..f5caafd20b0 100755 --- a/hack/prepare-envtest.sh +++ b/hack/prepare-envtest.sh @@ -26,7 +26,8 @@ if ! command -v setup-envtest &> /dev/null ; then exit 1 fi -export KUBEBUILDER_ASSETS="$(setup-envtest use -p path ${ENVTEST_K8S_VERSION})" +# --use-env allows overwriting the envtest tools path via the KUBEBUILDER_ASSETS env var +export KUBEBUILDER_ASSETS="$(setup-envtest use --use-env -p path ${ENVTEST_K8S_VERSION})" echo "using envtest tools installed at '$KUBEBUILDER_ASSETS'" source "$(dirname "$0")/test-integration.env"