From 3bb37e671a5e0eab0765652a61b2418ea3cee892 Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Mon, 4 May 2015 22:07:42 -0700 Subject: [PATCH] integration runner: Use the same CLI as the one available in the image. Signed-off-by: Andrea Luzzardi --- test/integration/test_runner.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/integration/test_runner.sh b/test/integration/test_runner.sh index 425689c56e..22f8a58811 100755 --- a/test/integration/test_runner.sh +++ b/test/integration/test_runner.sh @@ -18,7 +18,7 @@ TESTS=${@:-.} export SWARM_BINARY=`mktemp` # Build Swarm. -execute go build -o "$SWARM_BINARY" ../.. +execute time go build -o "$SWARM_BINARY" ../.. # Start the docker engine. execute docker --daemon --log-level=panic \ @@ -39,5 +39,12 @@ done # Pre-fetch the test image. execute time docker pull ${DOCKER_IMAGE}:${DOCKER_VERSION} > /dev/null +# Run the tests using the same client provided by the test image. +id=`execute docker create ${DOCKER_IMAGE}:${DOCKER_VERSION}` +tmp=`mktemp -d` +execute docker cp "${id}:/usr/local/bin/docker" "$tmp" +execute docker rm -f "$id" > /dev/null +export DOCKER_BINARY="${tmp}/docker" + # Run the tests. execute time bats -p $TESTS