File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -25,15 +25,15 @@ func TestMain(m *testing.M) {
25
25
envDefaultValue ("ARGOCD_VERSION" , "v3.0.0" )
26
26
27
27
if os .Getenv ("USE_TESTCONTAINERS" ) == "true" {
28
- SetupTestSuite ( m )
28
+ os . Exit ( runTestSuite ( m ) )
29
29
} else {
30
30
os .Exit (m .Run ())
31
31
}
32
32
}
33
33
34
34
func envDefaultValue (envvar , defaultValue string ) {
35
35
if v := os .Getenv (envvar ); v == "" {
36
- fmt .Printf ("%s not set; using %s as default value" , envvar , defaultValue )
36
+ fmt .Printf ("environment variable %s not set; using %s as default value\n " , envvar , defaultValue )
37
37
_ = os .Setenv (envvar , defaultValue )
38
38
}
39
39
}
@@ -43,12 +43,6 @@ const (
43
43
DefaultTestTimeout = 15 * time .Minute
44
44
)
45
45
46
- // SetupTestSuite sets up a shared test environment for all acceptance tests
47
- func SetupTestSuite (m * testing.M ) {
48
- code := runTestSuite (m )
49
- os .Exit (code )
50
- }
51
-
52
46
func runTestSuite (m * testing.M ) int {
53
47
ctx , cancel := context .WithTimeout (context .Background (), DefaultTestTimeout )
54
48
defer cancel ()
You can’t perform that action at this time.
0 commit comments