2015-07-28 01:08:04 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# Run the integration tests with multiple versions of the Docker engine
|
|
|
|
|
|
|
|
set -e
|
2015-07-30 22:38:33 +00:00
|
|
|
set -x
|
2015-07-28 01:08:04 +00:00
|
|
|
|
2015-08-05 23:26:34 +00:00
|
|
|
source helpers.bash
|
|
|
|
|
|
|
|
if [ `uname` = "Linux" ]; then
|
|
|
|
tmpdir_template="$TMPDIR/docker-versions.XXXXX"
|
|
|
|
else
|
|
|
|
# /tmp isn't available for mounting in boot2docker
|
|
|
|
tmpdir_template="`pwd`/../../../docker-versions.XXXXX"
|
|
|
|
fi
|
|
|
|
|
2015-07-28 01:08:04 +00:00
|
|
|
tmpdir=`mktemp -d "$tmpdir_template"`
|
|
|
|
trap "rm -rf $tmpdir" EXIT
|
|
|
|
|
2015-08-04 18:49:55 +00:00
|
|
|
if [ "$1" == "-d" ]; then
|
2015-08-05 23:26:34 +00:00
|
|
|
start_daemon
|
2015-07-28 01:08:04 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Released versions
|
|
|
|
|
2016-01-05 00:32:12 +00:00
|
|
|
versions="1.6.1 1.7.1 1.8.3 1.9.1"
|
2015-07-28 01:08:04 +00:00
|
|
|
|
|
|
|
for v in $versions; do
|
2015-07-30 22:38:33 +00:00
|
|
|
echo "Extracting Docker $v from dind image"
|
|
|
|
binpath="$tmpdir/docker-$v/docker"
|
|
|
|
ID=$(docker create dockerswarm/dind:$v)
|
|
|
|
docker cp "$ID:/usr/local/bin/docker" "$tmpdir/docker-$v"
|
|
|
|
|
2015-07-28 01:08:04 +00:00
|
|
|
echo "Running tests with Docker $v"
|
2015-08-05 23:26:34 +00:00
|
|
|
DOCKER_BINARY="$binpath" DOCKER_VOLUME="$DOCKER_VOLUME" DOCKER_GRAPHDRIVER="$DOCKER_GRAPHDRIVER" ./run.sh
|
2015-07-30 22:38:33 +00:00
|
|
|
|
|
|
|
# Cleanup.
|
|
|
|
docker rm -f "$ID"
|
2015-07-28 01:08:04 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
# Latest experimental version
|
|
|
|
|
2015-07-30 22:38:33 +00:00
|
|
|
echo "Extracting Docker master from dind image"
|
|
|
|
binpath="$tmpdir/docker-master/docker"
|
|
|
|
docker pull dockerswarm/dind-master
|
|
|
|
ID=$(docker create dockerswarm/dind-master)
|
|
|
|
docker cp "$ID:/usr/local/bin/docker" "$tmpdir/docker-master"
|
|
|
|
|
|
|
|
echo "Running tests with Docker master"
|
2015-08-05 23:26:34 +00:00
|
|
|
DOCKER_BINARY="$binpath" DOCKER_VOLUME="$DOCKER_VOLUME" ./run.sh
|
2015-07-30 22:38:33 +00:00
|
|
|
|
|
|
|
# Cleanup.
|
|
|
|
docker rm -f "$ID"
|