Browse Source

Merge pull request #46512 from rumpl/run-once

Don't run tests twice
Paweł Gronowski 1 year ago
parent
commit
cf5657d4bb

+ 1 - 1
integration/config/main_test.go

@@ -44,7 +44,7 @@ func TestMain(m *testing.M) {
 	}
 	span.End()
 	shutdown(ctx)
-	os.Exit(m.Run())
+	os.Exit(code)
 }
 
 func setupTest(t *testing.T) context.Context {

+ 1 - 1
integration/network/macvlan/main_test.go

@@ -50,5 +50,5 @@ func TestMain(m *testing.M) {
 	span.SetAttributes(attribute.Int("exit", code))
 	span.End()
 	shutdown(ctx)
-	os.Exit(m.Run())
+	os.Exit(code)
 }

+ 1 - 1
integration/plugin/common/main_test.go

@@ -37,7 +37,7 @@ func TestMain(m *testing.M) {
 	}
 	span.SetAttributes(attribute.Int("exit", ec))
 	shutdown(ctx)
-	os.Exit(m.Run())
+	os.Exit(ec)
 }
 
 func setupTest(t *testing.T) context.Context {