File tree Expand file tree Collapse file tree 4 files changed +6
-11
lines changed
Expand file tree Collapse file tree 4 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ test-short:
66test-long :
77 $(GO ) test $(VERBOSE_GO ) -race -tags " $( BUILDTAGS) " $(PKGS )
88
9- test-integration :
9+ test-integration : build
1010 $(eval TESTSUITE=$(filter-out $@ ,$(MAKECMDGOALS ) ) )
1111 test/integration/run-bats.sh $(TESTSUITE )
1212
Original file line number Diff line number Diff line change @@ -14,5 +14,6 @@ load ${BASE_TEST_DIR}/helpers.bash
1414 docker $( machine config $NAME ) run --name nolog busybox echo this should not be logged
1515 run docker $( machine config $NAME ) logs nolog
1616 echo ${output}
17- [ $status -eq 1 ]
17+ [ $status -eq 0 ]
18+ [[ ${lines[0]} =~ " no log driver named 'none' is registered" ]]
1819}
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ load ${BASE_TEST_DIR}/helpers.bash
66 run machine inspect $NAME
77 echo ${output}
88 [ " $status " -eq 1 ]
9- [[ ${lines[0]} == " Host \" $NAME \" does not exist " ]]
9+ [[ ${lines[0]} =~ " Host does not exist: \" $NAME \" " ]]
1010}
1111
1212@test " $DRIVER : create" {
Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ function machine() {
2626
2727function run_bats() {
2828 for bats_file in $( find " $1 " -name \* .bats) ; do
29+ export NAME=" bats-$DRIVER -test-$( date +%s) "
30+
2931 # BATS returns non-zero to indicate the tests have failed, we shouldn't
3032 # neccesarily bail in this case, so that's the reason for the e toggle.
3133 set +e
6264# TODO: Should the script bail out if these are set already?
6365export BASE_TEST_DIR=$( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd )
6466export MACHINE_ROOT=" $BASE_TEST_DIR /../.."
65- export NAME=" bats-$DRIVER -test"
6667export MACHINE_STORAGE_PATH=" /tmp/machine-bats-test-$DRIVER "
6768export MACHINE_BIN_NAME=docker-machine
6869export BATS_LOG=" $MACHINE_ROOT /bats.log"
@@ -90,11 +91,4 @@ if [[ -d "$MACHINE_STORAGE_PATH" ]]; then
9091 rm -r " $MACHINE_STORAGE_PATH "
9192fi
9293
93- set +e
94- pkill docker-machine
95- if [[ $? -eq 0 ]]; then
96- EXIT_STATUS=1
97- fi
98- set -e
99-
10094exit ${EXIT_STATUS}
You can’t perform that action at this time.
0 commit comments