We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5d48d2 commit 0c1017eCopy full SHA for 0c1017e
test/e2e/kubernetes_test.go
@@ -24,13 +24,15 @@ import (
24
)
25
26
func TestMain(m *testing.M) {
27
+ runner := m.Run
28
if isQASelected() {
- setQACredentialsEnvVars()
29
- setQAProject()
+ runner = func() int {
30
+ setQACredentialsEnvVars()
31
+ defer restoreEnvVars()
32
+ return m.Run()
33
+ }
34
}
- exitVal := m.Run()
- restoreEnvVars()
- os.Exit(exitVal)
35
+ os.Exit(runner())
36
37
38
func TestEnv(t *testing.T) {
@@ -90,7 +92,3 @@ func restoreEnv(envvar string) {
90
92
func savedEnvVar(envvar string) string {
91
93
return fmt.Sprintf("%s_SAVED", envvar)
94
-
-func setQAProject() {
95
96
-}
0 commit comments