forked from TrueCloudLab/distribution
Change run_multiversion.sh to get Docker engine versions from dind container
This is much better than downloading the builds with curl, because Docker is intelligent about only pulling what it needs. We use tagged versions of dind for the released version, and dind-master for a master build. Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
This commit is contained in:
parent
e564231f58
commit
1368e2ac53
2 changed files with 22 additions and 14 deletions
|
@ -3,6 +3,7 @@
|
||||||
# Run the integration tests with multiple versions of the Docker engine
|
# Run the integration tests with multiple versions of the Docker engine
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
set -x
|
||||||
|
|
||||||
# Don't use /tmp because this isn't available in boot2docker
|
# Don't use /tmp because this isn't available in boot2docker
|
||||||
tmpdir_template="`pwd`/docker-versions.XXXXX"
|
tmpdir_template="`pwd`/docker-versions.XXXXX"
|
||||||
|
@ -23,24 +24,31 @@ fi
|
||||||
|
|
||||||
# Released versions
|
# Released versions
|
||||||
|
|
||||||
versions="1.6.0 1.7.0"
|
versions="1.6.0 1.6.1 1.7.0 1.7.1"
|
||||||
|
|
||||||
for v in $versions; do
|
for v in $versions; do
|
||||||
echo "Downloading Docker $v"
|
echo "Extracting Docker $v from dind image"
|
||||||
binpath="$tmpdir/docker-$v"
|
binpath="$tmpdir/docker-$v/docker"
|
||||||
curl -L -o "$binpath" "https://test.docker.com/builds/Linux/x86_64/docker-$v"
|
ID=$(docker create dockerswarm/dind:$v)
|
||||||
chmod +x "$binpath"
|
docker cp "$ID:/usr/local/bin/docker" "$tmpdir/docker-$v"
|
||||||
|
|
||||||
echo "Running tests with Docker $v"
|
echo "Running tests with Docker $v"
|
||||||
DOCKER_BINARY="$binpath" DOCKER_VOLUME="$volume" ./run.sh
|
DOCKER_BINARY="$binpath" DOCKER_VOLUME="$volume" ./run.sh
|
||||||
|
|
||||||
|
# Cleanup.
|
||||||
|
docker rm -f "$ID"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Latest experimental version
|
# Latest experimental version
|
||||||
|
|
||||||
# Extract URI from https://experimental.docker.com/builds/
|
echo "Extracting Docker master from dind image"
|
||||||
experimental=`curl -sSL https://experimental.docker.com/builds/ | tr " " "\n" | grep 'https://experimental.docker.com/builds/Linux/'`
|
binpath="$tmpdir/docker-master/docker"
|
||||||
echo "Downloading Docker experimental"
|
docker pull dockerswarm/dind-master
|
||||||
binpath="$tmpdir/docker-experimental"
|
ID=$(docker create dockerswarm/dind-master)
|
||||||
curl -L -o "$binpath" "$experimental"
|
docker cp "$ID:/usr/local/bin/docker" "$tmpdir/docker-master"
|
||||||
chmod +x "$binpath"
|
|
||||||
echo "Running tests with Docker experimental"
|
echo "Running tests with Docker master"
|
||||||
DOCKER_BINARY="$binpath" DOCKER_VOLUME="$volume" ./run.sh
|
DOCKER_BINARY="$binpath" DOCKER_VOLUME="$volume" ./run.sh
|
||||||
|
|
||||||
|
# Cleanup.
|
||||||
|
docker rm -f "$ID"
|
||||||
|
|
|
@ -16,9 +16,9 @@ function setup() {
|
||||||
# skip basic auth tests with Docker 1.6, where they don't pass due to
|
# skip basic auth tests with Docker 1.6, where they don't pass due to
|
||||||
# certificate issues
|
# certificate issues
|
||||||
function basic_auth_version_check() {
|
function basic_auth_version_check() {
|
||||||
run sh -c 'docker version | fgrep -q "Client version: 1.6.0"'
|
run sh -c 'docker version | fgrep -q "Client version: 1.6."'
|
||||||
if [ "$status" -eq 0 ]; then
|
if [ "$status" -eq 0 ]; then
|
||||||
skip "Basic auth tests don't support 1.6.0"
|
skip "Basic auth tests don't support 1.6.x"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue