@@ -18,9 +18,12 @@ set -euox pipefail
1818
1919DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
2020
21+ # shellcheck source=test/scripts/e2e-common.sh
22+ source " ${DIR} /e2e-common.sh"
23+
2124EPP_IMAGE=" ${EPP_IMAGE:- ghcr.io/ llm-d/ llm-d-router-endpoint-picker: dev} "
2225SIM_IMAGE=" ${VLLM_IMAGE:- ghcr.io/ llm-d/ llm-d-inference-sim: v0.9.2} "
23- MANIFEST_PATH=" ${MANIFEST_PATH:- ${DIR} / ../ test / testdata/ sim-deployment.yaml} "
26+ MANIFEST_PATH=" ${MANIFEST_PATH:- ${DIR} / ../ testdata/ sim-deployment.yaml} "
2427USE_KIND=" ${USE_KIND:- true} "
2528KIND_NODE_IMAGE=" ${KIND_NODE_IMAGE:- mirror.gcr.io/ kindest/ node: v1.32.2} "
2629
@@ -48,18 +51,11 @@ load_images() {
4851 CLUSTER_NAME=" ${cluster} " ./scripts/load_image.sh " ${EPP_IMAGE} " " ${SIM_IMAGE} "
4952}
5053
51- cleanup () {
52- echo " Interrupted!"
53- if [ -n " ${CREATED_CLUSTER} " ] && [ " ${E2E_KEEP_CLUSTER_ON_FAILURE:- false} " != " true" ]; then
54- echo " Deleting kind cluster '${CREATED_CLUSTER} '"
55- kind delete cluster --name " ${CREATED_CLUSTER} " 2> /dev/null || true
56- fi
57- exit 130 # SIGINT (Ctrl+C)
58- }
59-
6054# Normally kind cluster cleanup is done by AfterSuite; this trap only fires on
6155# interruption signals so that a Ctrl+C still cleans up the cluster we created.
62- trap cleanup INT TERM
56+ # CREATED_CLUSTER is empty until we create a cluster ourselves, so an interrupt
57+ # before then deletes nothing.
58+ trap ' e2e_handle_interrupt "${CREATED_CLUSTER}"' INT TERM
6359
6460if [ " ${USE_KIND} " = " true" ]; then
6561 install_kind
9288fi
9389
9490echo " Running Go e2e tests in ./test/e2e/epp/..."
95- if [ -n " ${E2E_LABEL_FILTER:- } " ]; then
96- echo " Label filter: ${E2E_LABEL_FILTER} "
97- MANIFEST_PATH=" ${MANIFEST_PATH} " E2E_IMAGE=" ${EPP_IMAGE} " \
98- go test " ${DIR} /../test/e2e/epp/" -v -timeout 45m -ginkgo.v -ginkgo.fail-fast " -ginkgo.label-filter=${E2E_LABEL_FILTER} "
99- else
100- MANIFEST_PATH=" ${MANIFEST_PATH} " E2E_IMAGE=" ${EPP_IMAGE} " \
101- go test " ${DIR} /../test/e2e/epp/" -v -timeout 45m -ginkgo.v -ginkgo.fail-fast
102- fi
91+ export MANIFEST_PATH E2E_IMAGE=" ${EPP_IMAGE} "
92+ run_ginkgo_suite " ${DIR} /../e2e/epp/"
0 commit comments