mirror of https://github.com/docker/docs.git
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:
parent
2ba8acbaca
commit
3bb37e671a
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue