Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Commit

Permalink
Exit 1 if errors in test (closes #46)
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrián López Gómez committed Oct 3, 2016
1 parent 12fecd5 commit b965929
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ export GOPATH=$GOPATH

echo "--> Running tests"
echo -e '----> Running unit tests'
go list ./... | grep -v '/vendor/' | egrep -v '/database/|auth|cmd/|foulkon/foulkon' | PATH=$TEMPDIR:$PATH xargs -n1 go test ${GOTEST_FLAGS:--cover -timeout=900s}
go list ./... | grep -v '/vendor/' | egrep -v '/database/|auth|cmd/|foulkon/foulkon' | PATH=$TEMPDIR:$PATH xargs -n1 go test ${GOTEST_FLAGS:--cover -timeout=900s} || exit 1

echo -e '\n----> Running connector tests'
# Postgres
echo -e '--------> Running PostgreSQL connector'
echo $(echo -e 'Starting PostgreSQL (Docker container) postgrestest with id ') \
$(docker run --name postgrestest -p 54320:5432 -e POSTGRES_PASSWORD=password -d postgres) \
$(echo -e '\n\n')
go test ./database/postgresql ${GOTEST_FLAGS:--cover -timeout=900s}
go test ./database/postgresql ${GOTEST_FLAGS:--cover -timeout=900s} || exit 1
echo -e 'Removing PostgreSQL container' $(docker rm -f postgrestest) '\n'

0 comments on commit b965929

Please sign in to comment.