diff --git a/Dockerfile b/Dockerfile index bfb3cb44f..d05a0bc0e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,6 +33,7 @@ RUN go mod download RUN if [ "$INSTALL_TOOLS" == "yes" ] ; then \ go install github.com/swaggo/swag/cmd/swag@v1.8.7 && \ + go install gotest.tools/gotestsum@v1.10.1 && \ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh \ | sh -s -- -b $(go env GOPATH)/bin v1.50.0 ; \ fi diff --git a/scripts/go_test.sh b/scripts/go_test.sh index e36d1d08f..07426aa6f 100755 --- a/scripts/go_test.sh +++ b/scripts/go_test.sh @@ -8,4 +8,4 @@ TEST_DIRS=${1:-./...} # Run go test and colorize output (PASS - green, FAIL - red). # Set "-p 1" to run test sequentially to avoid parallel changes in testing database. -go test -v -p 1 -coverprofile=coverage.txt -covermode=atomic $TEST_DIRS +gotestsum --format=standard-verbose -- -v -p 1 -coverprofile=coverage.txt -covermode=atomic $TEST_DIRS diff --git a/scripts/go_test_db.sh b/scripts/go_test_db.sh index 3fdba8d10..e227aa882 100755 --- a/scripts/go_test_db.sh +++ b/scripts/go_test_db.sh @@ -9,7 +9,7 @@ go run ./scripts/feed_db.go inventory_hosts go run main.go migrate $MIGRATION_FILES # Run database test, destroys and recreates database -go test -v app/database_admin +gotestsum --format=standard-verbose -- -v app/database_admin # Fill database with testing data WAIT_FOR_DB=full go run ./scripts/feed_db.go feed