Tests: Add -parallel=1 to avoid db errors #237

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer 2020-02-21 02:47:06 +01:00
parent 4deca6b1ed
commit 09dbc762a3

View file

@ -89,23 +89,23 @@ acceptance-firefox:
(cd frontend && npm run acceptance-firefox)
test-go:
$(info Running all Go unit tests...)
$(GOTEST) -count=1 -tags=slow -timeout 20m ./pkg/... ./internal/...
$(GOTEST) -parallel=1 -count=1 -tags=slow -timeout 20m ./pkg/... ./internal/...
test-verbose:
$(info Running all Go unit tests in verbose mode...)
$(GOTEST) -tags=slow -timeout 20m -v ./pkg/... ./internal/...
$(GOTEST) -parallel=1 -tags=slow -timeout 20m -v ./pkg/... ./internal/...
test-short:
$(info Running short Go unit tests in verbose mode...)
$(GOTEST) -short -timeout 5m -v ./pkg/... ./internal/...
$(GOTEST) -parallel=1 -short -timeout 5m -v ./pkg/... ./internal/...
test-race:
$(info Running all Go unit tests with race detection in verbose mode...)
$(GOTEST) -tags=slow -race -timeout 60m -v ./pkg/... ./internal/...
$(GOTEST) -parallel=1 -tags=slow -race -timeout 60m -v ./pkg/... ./internal/...
test-codecov:
$(info Running all Go unit tests with code coverage report for codecov...)
go test -count=1 -tags=slow -timeout 30m -coverprofile=coverage.txt -covermode=atomic -v ./pkg/... ./internal/...
go test -parallel=1 -count=1 -tags=slow -timeout 30m -coverprofile=coverage.txt -covermode=atomic -v ./pkg/... ./internal/...
scripts/codecov.sh
test-coverage:
$(info Running all Go unit tests with code coverage report...)
go test -count=1 -tags=slow -timeout 30m -coverprofile=coverage.txt -covermode=atomic -v ./pkg/... ./internal/...
go test -parallel=1 -count=1 -tags=slow -timeout 30m -coverprofile=coverage.txt -covermode=atomic -v ./pkg/... ./internal/...
go tool cover -html=coverage.txt -o coverage.html
clean:
rm -f $(BINARY_NAME)