From 451727aa19ffe6baecc8a4f4f6560603bd038d5c Mon Sep 17 00:00:00 2001 From: Robert Bailey Date: Mon, 9 Mar 2015 11:46:50 +0100 Subject: [PATCH] Always stop the guestbook example regardless of how the tests finishes. This should more reliably clean up the external load balancer. --- hack/e2e-suite/guestbook.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hack/e2e-suite/guestbook.sh b/hack/e2e-suite/guestbook.sh index b784c39b90..533ff541bd 100755 --- a/hack/e2e-suite/guestbook.sh +++ b/hack/e2e-suite/guestbook.sh @@ -33,9 +33,15 @@ export KUBECTL KUBE_CONFIG_FILE source "${KUBE_ROOT}/cluster/kube-env.sh" source "${KUBE_VERSION_ROOT}/cluster/${KUBERNETES_PROVIDER}/util.sh" +GUESTBOOK="${KUBE_ROOT}/examples/guestbook" + +function teardown() { + ${KUBECTL} stop -f "${GUESTBOOK}" +} + prepare-e2e -GUESTBOOK="${KUBE_ROOT}/examples/guestbook" +trap "teardown" EXIT echo "WARNING: this test is a no op that only attempts to launch guestbook resources." # Launch the guestbook example