mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-10-29 04:39:16 +00:00
remove unnecessary factory delegation for RESTClientGetter method
This commit is contained in:
committed by
Maciej Szulik
parent
4da73a5f3d
commit
c85e69aeb9
@@ -170,7 +170,7 @@ func TestRunArgsFollowDashRules(t *testing.T) {
|
||||
}
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
tf := cmdtesting.NewTestFactory()
|
||||
tf := cmdtesting.NewTestFactory().WithNamespace("test")
|
||||
defer tf.Cleanup()
|
||||
|
||||
codec := legacyscheme.Codecs.LegacyCodec(scheme.Scheme.PrioritizedVersionsAllGroups()...)
|
||||
@@ -190,7 +190,6 @@ func TestRunArgsFollowDashRules(t *testing.T) {
|
||||
}),
|
||||
}
|
||||
|
||||
tf.Namespace = "test"
|
||||
tf.ClientConfigVal = &restclient.Config{}
|
||||
|
||||
cmd := NewCmdRun(tf, genericclioptions.NewTestIOStreamsDiscard())
|
||||
@@ -505,7 +504,7 @@ func TestRunValidations(t *testing.T) {
|
||||
}
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
tf := cmdtesting.NewTestFactory()
|
||||
tf := cmdtesting.NewTestFactory().WithNamespace("test")
|
||||
defer tf.Cleanup()
|
||||
|
||||
_, _, codec := cmdtesting.NewExternalScheme()
|
||||
@@ -513,7 +512,6 @@ func TestRunValidations(t *testing.T) {
|
||||
NegotiatedSerializer: scheme.Codecs,
|
||||
Resp: &http.Response{StatusCode: 200, Header: defaultHeader(), Body: objBody(codec, cmdtesting.NewInternalType("", "", ""))},
|
||||
}
|
||||
tf.Namespace = "test"
|
||||
tf.ClientConfigVal = defaultClientConfig()
|
||||
|
||||
streams, _, _, bufErr := genericclioptions.NewTestIOStreams()
|
||||
|
||||
Reference in New Issue
Block a user