Skip to content

Commit 94198d3

Browse files
committed
fix e2e test
1 parent 61dc677 commit 94198d3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/e2e/e2e_suite_test.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,6 @@ var _ = ginkgo.BeforeSuite(func() {
109109
kubeconfig := filepath.Join(os.Getenv("HOME"), ".kube", "config")
110110
os.Setenv(kubeconfigEnvVar, kubeconfig)
111111
}
112-
handleFlags()
113-
framework.AfterReadingAllFlags(&framework.TestContext)
114112

115113
options := nfs.DriverOptions{
116114
NodeID: nodeID,
@@ -215,6 +213,12 @@ func execTestCmd(cmds []testCmd) {
215213
}
216214
}
217215

216+
func TestMain(m *testing.M) {
217+
handleFlags()
218+
framework.AfterReadingAllFlags(&framework.TestContext)
219+
os.Exit(m.Run())
220+
}
221+
218222
func TestE2E(t *testing.T) {
219223
gomega.RegisterFailHandler(ginkgo.Fail)
220224
ginkgo.RunSpecs(t, "E2E Suite")

0 commit comments

Comments
 (0)