mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-10 04:36:43 +00:00
Other: Add race-condition and leak checks to the makefile
This commit is contained in:
10
Makefile
10
Makefile
@ -218,10 +218,16 @@ change-copyright-year:
|
||||
./utils/missing_license.sh change-year
|
||||
|
||||
test: gofiles
|
||||
go test -v -coverprofile=/tmp/coverage.out -run=${TESTRUN} ./internal/... ./pkg/...
|
||||
go test -v -p=1 -count=1 -coverprofile=/tmp/coverage.out -run=${TESTRUN} ./internal/... ./pkg/...
|
||||
|
||||
test-race: gofiles
|
||||
go test -v -p=1 -count=1 -race -failfast -run=${TESTRUN} ./internal/... ./pkg/...
|
||||
|
||||
test-integration: gofiles
|
||||
go test -v github.com/ProtonMail/proton-bridge/v2/tests
|
||||
go test -v -p=1 -count=1 github.com/ProtonMail/proton-bridge/v2/tests
|
||||
|
||||
test-integration-race: gofiles
|
||||
go test -v -p=1 -count=1 -race -failfast github.com/ProtonMail/proton-bridge/v2/tests
|
||||
|
||||
bench:
|
||||
go test -run '^$$' -bench=. -memprofile bench_mem.pprof -cpuprofile bench_cpu.pprof ./internal/store
|
||||
|
||||
@ -29,6 +29,7 @@ import (
|
||||
"github.com/cucumber/godog"
|
||||
"github.com/stretchr/testify/require"
|
||||
"gitlab.protontech.ch/go/liteapi/server/backend"
|
||||
"go.uber.org/goleak"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@ -57,6 +58,10 @@ func (s *scenario) close(tb testing.TB) {
|
||||
require.NoError(tb, s.t.close(context.Background()))
|
||||
}
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
goleak.VerifyTestMain(m, goleak.IgnoreCurrent())
|
||||
}
|
||||
|
||||
func TestFeatures(testingT *testing.T) {
|
||||
suite := godog.TestSuite{
|
||||
ScenarioInitializer: func(ctx *godog.ScenarioContext) {
|
||||
|
||||
Reference in New Issue
Block a user