Other(CI): Increase integration tests timeout

This commit is contained in:
James Houlahan
2022-10-25 13:54:25 +02:00
parent 14fbdb5e04
commit 351c019310
3 changed files with 15 additions and 9 deletions

View File

@ -218,16 +218,16 @@ change-copyright-year:
./utils/missing_license.sh change-year ./utils/missing_license.sh change-year
test: gofiles test: gofiles
go test -v -p=1 -count=1 -coverprofile=/tmp/coverage.out -run=${TESTRUN} ./internal/... ./pkg/... go test -v -timeout=5m -p=1 -count=1 -coverprofile=/tmp/coverage.out -run=${TESTRUN} ./internal/... ./pkg/...
test-race: gofiles test-race: gofiles
go test -v -p=1 -count=1 -race -failfast -run=${TESTRUN} ./internal/... ./pkg/... go test -v -timeout=30m -p=1 -count=1 -race -failfast -run=${TESTRUN} ./internal/... ./pkg/...
test-integration: gofiles test-integration: gofiles
go test -v -p=1 -count=1 github.com/ProtonMail/proton-bridge/v2/tests go test -v -timeout=10m -p=1 -count=1 github.com/ProtonMail/proton-bridge/v2/tests
test-integration-race: gofiles test-integration-race: gofiles
go test -v -p=1 -count=1 -race -failfast github.com/ProtonMail/proton-bridge/v2/tests go test -v -timeout=60m -p=1 -count=1 -race -failfast github.com/ProtonMail/proton-bridge/v2/tests
bench: bench:
go test -run '^$$' -bench=. -memprofile bench_mem.pprof -cpuprofile bench_cpu.pprof ./internal/store go test -run '^$$' -bench=. -memprofile bench_mem.pprof -cpuprofile bench_cpu.pprof ./internal/store

View File

@ -29,7 +29,6 @@ import (
"github.com/cucumber/godog" "github.com/cucumber/godog"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"gitlab.protontech.ch/go/liteapi/server/backend" "gitlab.protontech.ch/go/liteapi/server/backend"
"go.uber.org/goleak"
) )
func init() { func init() {
@ -58,10 +57,6 @@ func (s *scenario) close(tb testing.TB) {
require.NoError(tb, s.t.close(context.Background())) require.NoError(tb, s.t.close(context.Background()))
} }
func TestMain(m *testing.M) {
goleak.VerifyTestMain(m, goleak.IgnoreCurrent())
}
func TestFeatures(testingT *testing.T) { func TestFeatures(testingT *testing.T) {
suite := godog.TestSuite{ suite := godog.TestSuite{
ScenarioInitializer: func(ctx *godog.ScenarioContext) { ScenarioInitializer: func(ctx *godog.ScenarioContext) {

11
tests/main_test.go Normal file
View File

@ -0,0 +1,11 @@
package tests
import (
"testing"
"go.uber.org/goleak"
)
func TestMain(m *testing.M) {
goleak.VerifyTestMain(m, goleak.IgnoreCurrent())
}