Fix test error reporting after failure

This commit is contained in:
Stefan Martinov 2017-11-09 15:15:09 +01:00
parent 2b338895f9
commit 0b2139d051
2 changed files with 13 additions and 11 deletions

View File

@ -12,5 +12,8 @@ test: clean
install-test-dependencies:
go get -u github.com/ventu-io/go-shortid
go get -u github.com/bwmarrin/snowflake
go get -u github.com/sergi/go-diff/...
go get -u github.com/sergi/go-diff/diffmatchpatch
go get -u github.com/nbutton23/zxcvbn-go
go get -u gopkg.in/mgo.v2/bson
go get -u github.com/mitchellh/mapstructure
go get -u golang.org/x/crypto/bcrypt

View File

@ -10,17 +10,16 @@ export MONGO_URL_PRODUCTS="mongodb://127.0.0.1:${MONGO_PORT}/products"
ERRORS=""
RES=0
go test -v ${TEST_PATH}/crypto || (ERRORS="${ERRORS} crypto tests failed" && RES=1)
go test -v ${TEST_PATH}/examples || (ERRORS="${ERRORS} examples tests failed" && RES=1)
go test -v ${TEST_PATH}/shop_error || (ERRORS="${ERRORS} shop_error tests failed" && RES=1)
go test -v ${TEST_PATH}/state || (ERRORS="${ERRORS} state tests failed" && RES=1)
go test -v ${TEST_PATH}/test_utils || (ERRORS="${ERRORS} test_utils tests failed" && RES=1)
go test -v ${TEST_PATH}/unique || (ERRORS="${ERRORS} unique tests failed" && RES=1)
go test -v ${TEST_PATH}/order || (ERRORS="${ERRORS} order tests failed" && RES=1)
go test -v ${TEST_PATH}/customer || (ERRORS="${ERRORS} customer tests failed" && RES=1)
go test -v ${TEST_PATH}/watchlist || (ERRORS="${ERRORS} watchlist failed" && RES=1)
go test -v ${TEST_PATH}/crypto || ERRORS="${ERRORS} crypto tests failed" RES=1
go test -v ${TEST_PATH}/examples || ERRORS="${ERRORS} examples tests failed" RES=1
go test -v ${TEST_PATH}/shop_error || ERRORS="${ERRORS} shop_error tests failed" RES=1
go test -v ${TEST_PATH}/state || ERRORS="${ERRORS} state tests failed" RES=1
go test -v ${TEST_PATH}/unique || ERRORS="${ERRORS} unique tests failed" RES=1
go test -v ${TEST_PATH}/order || ERRORS="${ERRORS} order tests failed" RES=1
go test -v ${TEST_PATH}/customer || ERRORS="${ERRORS} customer tests failed" RES=1
go test -v ${TEST_PATH}/watchlist || ERRORS="${ERRORS} watchlist failed" RES=1
echo ${ERRORS}]
echo ${ERRORS}
docker stop ${CONTAINER}