From ae8172ec972b4f8959c160441d37733e6fcb5a92 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Tue, 23 Jun 2015 14:39:29 +0100 Subject: [PATCH] simplify docker image removal --- test/610_proxy_wait_for_weave_test.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/610_proxy_wait_for_weave_test.sh b/test/610_proxy_wait_for_weave_test.sh index 49d023e9..acb748d5 100755 --- a/test/610_proxy_wait_for_weave_test.sh +++ b/test/610_proxy_wait_for_weave_test.sh @@ -10,9 +10,7 @@ start_suite "Proxy waits for weave to be ready before running container commands weave_on $HOST1 launch-proxy BASE_IMAGE=busybox # Ensure the base image does not exist, so that it will be pulled -if (docker_on $HOST1 images $BASE_IMAGE | grep -q $BASE_IMAGE); then - docker_on $HOST1 rmi $BASE_IMAGE -fi +! docker_on $HOST1 inspect --format=" " $BASE_IMAGE >/dev/null 2>&1 || docker_on $HOST1 rmi $BASE_IMAGE assert_raises "proxy docker_on $HOST1 run --name c1 -e 'WEAVE_CIDR=10.2.1.1/24' $BASE_IMAGE $CHECK_ETHWE_UP"