Skip to content

Commit c4ee9ce

Browse files
soltyshbertinatto
authored andcommitted
UPSTREAM: <carry>: export HandleFlags
OpenShift-Rebase-Source: 7bf2f1f
1 parent db494f1 commit c4ee9ce

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

test/e2e/e2e_test.go

+1-10
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ import (
3636
"k8s.io/klog/v2"
3737
conformancetestdata "k8s.io/kubernetes/test/conformance/testdata"
3838
"k8s.io/kubernetes/test/e2e/framework"
39-
"k8s.io/kubernetes/test/e2e/framework/config"
4039
"k8s.io/kubernetes/test/e2e/framework/testfiles"
4140
e2etestingmanifests "k8s.io/kubernetes/test/e2e/testing-manifests"
4241
testfixtures "k8s.io/kubernetes/test/fixtures"
@@ -72,21 +71,13 @@ import (
7271
_ "k8s.io/kubernetes/test/utils/format"
7372
)
7473

75-
// handleFlags sets up all flags and parses the command line.
76-
func handleFlags() {
77-
config.CopyFlags(config.Flags, flag.CommandLine)
78-
framework.RegisterCommonFlags(flag.CommandLine)
79-
framework.RegisterClusterFlags(flag.CommandLine)
80-
flag.Parse()
81-
}
82-
8374
func TestMain(m *testing.M) {
8475
var versionFlag bool
8576
flag.CommandLine.BoolVar(&versionFlag, "version", false, "Displays version information.")
8677
listConformanceTests := flag.CommandLine.Bool("list-conformance-tests", false, "If true, will show list of conformance tests.")
8778

8879
// Register test flags, then parse flags.
89-
handleFlags()
80+
HandleFlags()
9081

9182
if versionFlag {
9283
fmt.Printf("%s\n", version.Get())

test/e2e/patch_e2e.go

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package e2e
2+
3+
import (
4+
"flag"
5+
6+
"k8s.io/kubernetes/test/e2e/framework"
7+
"k8s.io/kubernetes/test/e2e/framework/config"
8+
)
9+
10+
func HandleFlags() {
11+
config.CopyFlags(config.Flags, flag.CommandLine)
12+
framework.RegisterCommonFlags(flag.CommandLine)
13+
framework.RegisterClusterFlags(flag.CommandLine)
14+
flag.Parse()
15+
}

0 commit comments

Comments
 (0)