Skip to content

Commit 1772446

Browse files
authored
Merge pull request kubernetes#84937 from neolit123/1.17-fix-kubeadm-test-suite-flags
e2e_kubeadm: fix missing suite --test* flags
2 parents cee00e9 + 0b32683 commit 1772446

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

test/e2e_kubeadm/e2e_kubeadm_suite_test.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,12 @@ import (
3333
e2econfig "k8s.io/kubernetes/test/e2e/framework/config"
3434
)
3535

36-
func init() {
36+
func TestMain(m *testing.M) {
37+
// Copy go flags in TestMain, to ensure go test flags are registered (no longer available in init() as of go1.13)
3738
e2econfig.CopyFlags(e2econfig.Flags, flag.CommandLine)
3839
framework.RegisterCommonFlags(flag.CommandLine)
3940
framework.RegisterClusterFlags(flag.CommandLine)
40-
4141
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
42-
}
43-
44-
func TestMain(m *testing.M) {
4542
pflag.Parse()
4643
framework.AfterReadingAllFlags(&framework.TestContext)
4744
os.Exit(m.Run())

0 commit comments

Comments
 (0)