ci: fix test on database
continuous-integration/drone the build was successful Details

This commit is contained in:
Geno 2021-06-02 18:20:42 +02:00
parent a0fe660f97
commit 5ce9b1698b
1 changed files with 2 additions and 2 deletions

View File

@ -19,11 +19,11 @@ pipeline:
image: golang:latest image: golang:latest
commands: commands:
- go get -d -t ./... - go get -d -t ./...
- go test -ldflags "-X dev.sum7.eu/genofire/golang-lib/web/webtest.DBConnection=postgres://root:root@database:26257/defaultdb?sslmode=disable" $(go list ./... | grep -v /vendor/) -v -failfast -p 1 -coverprofile .testCoverage.txt - go test -ldflags "-X dev.sum7.eu/genofire/golang-lib/web/webtest.DBConnection=postgres://root:root@database:26257/defaultdb?sslmode=disable -X dev.sum7.eu/genofire/golang-lib/database.DBConnection=postgres://root:root@database:26257/defaultdb?sslmode=disable" $(go list ./... | grep -v /vendor/) -v -failfast -p 1 -coverprofile .testCoverage.txt
- go tool cover -func=".testCoverage.txt" - go tool cover -func=".testCoverage.txt"
test-race: test-race:
image: golang:latest image: golang:latest
commands: commands:
- go get -d -t ./... - go get -d -t ./...
- go test -ldflags "-X dev.sum7.eu/genofire/golang-lib/web/webtest.DBConnection=postgres://root:root@database:26257/defaultdb?sslmode=disable" $(go list ./... | grep -v /vendor/) -race - go test -ldflags "-X dev.sum7.eu/genofire/golang-lib/web/webtest.DBConnection=postgres://root:root@database:26257/defaultdb?sslmode=disable -X dev.sum7.eu/genofire/golang-lib/database.DBConnection=postgres://root:root@database:26257/defaultdb?sslmode=disable" $(go list ./... | grep -v /vendor/) -race