@@ -44,21 +44,34 @@ function startup {
4444 fi
4545}
4646
47- trap cleanup EXIT
48- startup
49- prepare_docker_images
47+ if [[ " ${E2E_RUN_ONLY_SLICE} " != ' true' ]]; then
48+ trap cleanup EXIT
49+ startup
50+ prepare_docker_images
51+ fi
52+
5053kind_load " $KIND_CLUSTER_NAME " " "
5154
52- # We need to wait for Kueue to become available;
53- # otherwise, we encounter the error: "no endpoints available for service 'kueue-webhook-service'"
54- echo " Waiting for Kueue to become available..."
55- kubectl wait deploy/kueue-controller-manager -nkueue-system --for=condition=available --timeout=5m
55+ if [[ " ${E2E_RUN_ONLY_SLICE} " != ' true' ]]; then
56+ # We need to wait for Kueue to become available;
57+ # otherwise, we encounter the error: "no endpoints available for service 'kueue-webhook-service'"
58+ echo " Waiting for Kueue to become available..."
59+ kubectl wait deploy/kueue-controller-manager -nkueue-system --for=condition=available --timeout=5m
60+ fi
5661
5762cluster_slice_deploy " "
5863
59- if [ " $E2E_RUN_ONLY_ENV " == ' true' ]; then
60- read -rp " Press Enter to cleanup."
61- else
62- # shellcheck disable=SC2086
63- $GINKGO $GINKGO_ARGS --junit-report=junit.xml --json-report=e2e.json --output-dir=" $ARTIFACTS " -v ./test/e2e/...
64+ if [ " $E2E_RUN_ONLY_ENV " = " true" ]; then
65+ if [[ " ${E2E_RUN_ONLY_SLICE} " != ' true' ]]; then
66+ read -rp " Do you want to cleanup? [Y/n] " reply
67+ if [[ " $reply " =~ ^[nN]$ ]]; then
68+ trap - EXIT
69+ echo " Skipping cleanup for kind cluster."
70+ echo -e " \nKind cluster cleanup:\n kind delete cluster --name $KIND_CLUSTER_NAME "
71+ fi
72+ fi
73+ exit 0
6474fi
75+
76+ # shellcheck disable=SC2086
77+ $GINKGO $GINKGO_ARGS --junit-report=junit.xml --json-report=e2e.json --output-dir=" $ARTIFACTS " -v ./test/e2e/...
0 commit comments