mirror of
https://github.com/docker/docs.git
synced 2026-04-04 18:28:58 +07:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user