mirror of https://github.com/docker/docs.git
commit
ffbfb443c2
|
|
@ -6,7 +6,7 @@ test-short:
|
|||
test-long:
|
||||
$(GO) test $(VERBOSE_GO) -race -tags "$(BUILDTAGS)" $(PKGS)
|
||||
|
||||
test-integration:
|
||||
test-integration: build
|
||||
$(eval TESTSUITE=$(filter-out $@,$(MAKECMDGOALS)))
|
||||
test/integration/run-bats.sh $(TESTSUITE)
|
||||
|
||||
|
|
|
|||
|
|
@ -14,5 +14,6 @@ load ${BASE_TEST_DIR}/helpers.bash
|
|||
docker $(machine config $NAME) run --name nolog busybox echo this should not be logged
|
||||
run docker $(machine config $NAME) logs nolog
|
||||
echo ${output}
|
||||
[ $status -eq 1 ]
|
||||
[ $status -eq 0 ]
|
||||
[[ ${lines[0]} =~ "no log driver named 'none' is registered" ]]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ load ${BASE_TEST_DIR}/helpers.bash
|
|||
run machine inspect $NAME
|
||||
echo ${output}
|
||||
[ "$status" -eq 1 ]
|
||||
[[ ${lines[0]} == "Host \"$NAME\" does not exist" ]]
|
||||
[[ ${lines[0]} =~ "Host does not exist: \"$NAME\"" ]]
|
||||
}
|
||||
|
||||
@test "$DRIVER: create" {
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ function machine() {
|
|||
|
||||
function run_bats() {
|
||||
for bats_file in $(find "$1" -name \*.bats); do
|
||||
export NAME="bats-$DRIVER-test-$(date +%s)"
|
||||
|
||||
# BATS returns non-zero to indicate the tests have failed, we shouldn't
|
||||
# neccesarily bail in this case, so that's the reason for the e toggle.
|
||||
set +e
|
||||
|
|
@ -62,7 +64,6 @@ fi
|
|||
# TODO: Should the script bail out if these are set already?
|
||||
export BASE_TEST_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
export MACHINE_ROOT="$BASE_TEST_DIR/../.."
|
||||
export NAME="bats-$DRIVER-test"
|
||||
export MACHINE_STORAGE_PATH="/tmp/machine-bats-test-$DRIVER"
|
||||
export MACHINE_BIN_NAME=docker-machine
|
||||
export BATS_LOG="$MACHINE_ROOT/bats.log"
|
||||
|
|
@ -90,11 +91,4 @@ if [[ -d "$MACHINE_STORAGE_PATH" ]]; then
|
|||
rm -r "$MACHINE_STORAGE_PATH"
|
||||
fi
|
||||
|
||||
set +e
|
||||
pkill docker-machine
|
||||
if [[ $? -eq 0 ]]; then
|
||||
EXIT_STATUS=1
|
||||
fi
|
||||
set -e
|
||||
|
||||
exit ${EXIT_STATUS}
|
||||
|
|
|
|||
Loading…
Reference in New Issue