integration runner: Use the same CLI as the one available in the image.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi 2015-05-04 22:07:42 -07:00
parent 2ba8acbaca
commit 3bb37e671a
1 changed files with 8 additions and 1 deletions

View File

@ -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