1
0
mirror of https://github.com/distribution/distribution synced 2024-11-12 05:45:51 +01:00
distribution/contrib/docker-integration/test_runner.sh
Aaron Lehmann 1e15b6e001 Redesign integration testing to copy images to nested containers
Previously, the strategy for avoiding lots of rebuilding and repulling
for each Docker version being tested was to use a mountpoint to persist
/var/lib/docker. This was pretty broken, and may not be a reliable
strategy. This commit changes the scripts to instead build/pull images
outside the innermost container, and copy them to the final test
environment with docker save/docker load.

This requires a fair amount of changes, since run.sh must now
communicate with the Docker engine that was formerly started by
test_runner.sh. The code that starts this engine has been broken out to
run_engine.sh so that starting the engine and running the tests under it
can be done separately (with the images loaded in between these steps).

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-08-06 18:06:18 -07:00

19 lines
255 B
Bash
Executable File

#!/usr/bin/env bash
set -e
cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
TESTS=${@:-.}
function execute() {
>&2 echo "++ $@"
eval "$@"
}
execute time docker-compose build
execute docker-compose up -d
# Run the tests.
execute time bats -p $TESTS