e2e_kubeadm: fix missing suite --test* flags

For more details see 00e1ffb4e0.
This commit is contained in:
Lubomir I. Ivanov
2019-11-07 20:49:28 +02:00
parent f7c3fa8324
commit 0b326831e1

View File

@@ -33,15 +33,12 @@ import (
e2econfig "k8s.io/kubernetes/test/e2e/framework/config"
)
func init() {
func TestMain(m *testing.M) {
// Copy go flags in TestMain, to ensure go test flags are registered (no longer available in init() as of go1.13)
e2econfig.CopyFlags(e2econfig.Flags, flag.CommandLine)
framework.RegisterCommonFlags(flag.CommandLine)
framework.RegisterClusterFlags(flag.CommandLine)
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
}
func TestMain(m *testing.M) {
pflag.Parse()
framework.AfterReadingAllFlags(&framework.TestContext)
os.Exit(m.Run())