test(web): on ci
continuous-integration/drone the build was successful
Details
continuous-integration/drone the build was successful
Details
This commit is contained in:
parent
72fa8a8113
commit
0e411ba5e2
|
@ -21,7 +21,7 @@ pipeline:
|
|||
group: test
|
||||
commands:
|
||||
- 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 -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 test -ldflags "-X dev.sum7.eu/genofire/golang-lib/web.TestRunTLS=false -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"
|
||||
|
||||
test-race:
|
||||
|
@ -29,4 +29,4 @@ pipeline:
|
|||
group: test-race
|
||||
commands:
|
||||
- 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 -X dev.sum7.eu/genofire/golang-lib/database.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.TestRunTLS=false -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
|
||||
|
|
|
@ -7,6 +7,10 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
var (
|
||||
TestRunTLS = ""
|
||||
)
|
||||
|
||||
func TestRun(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
|
@ -24,6 +28,9 @@ func TestRun(t *testing.T) {
|
|||
s.Run()
|
||||
})
|
||||
|
||||
if TestRunTLS == "false" {
|
||||
return
|
||||
}
|
||||
s.Listen = ""
|
||||
// httpS - failed
|
||||
err = s.Run()
|
||||
|
|
Loading…
Reference in New Issue