From afac7c4d09793c7bf3ec96a52abca21ca5d1dc58 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Thu, 13 Jul 2017 13:41:48 +0000 Subject: [PATCH] Change test 610 to use a Weaveworks container Previously we used 'alpine' which had no 'CMD' line, but that changed upstream, so generate our own trivial image for this purpose. --- test/610_proxy_wait_for_weave_test.sh | 2 +- test/images/no-cmd/Dockerfile | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 test/images/no-cmd/Dockerfile diff --git a/test/610_proxy_wait_for_weave_test.sh b/test/610_proxy_wait_for_weave_test.sh index a701a9bb..82053b54 100755 --- a/test/610_proxy_wait_for_weave_test.sh +++ b/test/610_proxy_wait_for_weave_test.sh @@ -46,6 +46,6 @@ assert "echo $((dirs_with_proxy-3))" $dirs_sans_proxy # Check errors are returned (when docker returns an error code) assert_raises "proxy docker_on $HOST1 run -e 'WEAVE_CIDR=10.2.1.3/24' $SMALL_IMAGE foo 2>&1 | grep 'exec: \"foo\": executable file not found in \$PATH'" # Check errors still happen when no command is specified -assert_raises "proxy docker_on $HOST1 run -e 'WEAVE_CIDR=10.2.1.3/24' $SMALL_IMAGE 2>&1 | grep 'Error response from daemon: No command specified'" +assert_raises "proxy docker_on $HOST1 run -e 'WEAVE_CIDR=10.2.1.3/24' weaveworks/no-cmd 2>&1 | grep 'Error response from daemon: No command specified'" end_suite diff --git a/test/images/no-cmd/Dockerfile b/test/images/no-cmd/Dockerfile new file mode 100644 index 00000000..7b431273 --- /dev/null +++ b/test/images/no-cmd/Dockerfile @@ -0,0 +1,4 @@ +# Create a Docker image with no CMD, specifically so we can generate +# an error when we try to run it +FROM scratch +COPY Dockerfile /