mirror of https://github.com/docker/docs.git
Merge pull request #2332 from jeanlaurent/it-copy-boot2docker.iso
IT: Bootstrap test quicker by caching boot2docker iso if present
This commit is contained in:
commit
299d4f6a07
|
@ -66,6 +66,7 @@ export NAME="bats-$DRIVER-test"
|
||||||
export MACHINE_STORAGE_PATH="/tmp/machine-bats-test-$DRIVER"
|
export MACHINE_STORAGE_PATH="/tmp/machine-bats-test-$DRIVER"
|
||||||
export MACHINE_BIN_NAME=docker-machine
|
export MACHINE_BIN_NAME=docker-machine
|
||||||
export BATS_LOG="$MACHINE_ROOT/bats.log"
|
export BATS_LOG="$MACHINE_ROOT/bats.log"
|
||||||
|
B2D_LOCATION=~/.docker/machine/cache/boot2docker.iso
|
||||||
|
|
||||||
# This function gets used in the integration tests, so export it.
|
# This function gets used in the integration tests, so export it.
|
||||||
export -f machine
|
export -f machine
|
||||||
|
@ -78,6 +79,11 @@ if [[ -d "$MACHINE_STORAGE_PATH" ]]; then
|
||||||
rm -r "$MACHINE_STORAGE_PATH"
|
rm -r "$MACHINE_STORAGE_PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "$b2dcache" == "1" ]] && [[ -f $B2D_LOCATION ]]; then
|
||||||
|
mkdir -p "${MACHINE_STORAGE_PATH}/cache"
|
||||||
|
cp $B2D_LOCATION "${MACHINE_STORAGE_PATH}/cache/boot2docker.iso"
|
||||||
|
fi
|
||||||
|
|
||||||
run_bats "$BATS_FILE"
|
run_bats "$BATS_FILE"
|
||||||
|
|
||||||
if [[ -d "$MACHINE_STORAGE_PATH" ]]; then
|
if [[ -d "$MACHINE_STORAGE_PATH" ]]; then
|
||||||
|
|
Loading…
Reference in New Issue