Merge pull request #84937 from neolit123/1.17-fix-kubeadm-test-suite-flags

e2e_kubeadm: fix missing suite --test* flags
This commit is contained in:
Kubernetes Prow Robot 2019-11-07 16:21:01 -08:00 committed by GitHub
commit 1772446c46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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())