mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-10-15 19:49:36 +00:00
remove unnecessary factory delegation for RESTClientGetter method
This commit is contained in:
committed by
Maciej Szulik
parent
4da73a5f3d
commit
c85e69aeb9
@@ -322,10 +322,9 @@ func TestLabelErrors(t *testing.T) {
|
||||
|
||||
for k, testCase := range testCases {
|
||||
t.Run(k, func(t *testing.T) {
|
||||
tf := cmdtesting.NewTestFactory()
|
||||
tf := cmdtesting.NewTestFactory().WithNamespace("test")
|
||||
defer tf.Cleanup()
|
||||
|
||||
tf.Namespace = "test"
|
||||
tf.ClientConfigVal = defaultClientConfig()
|
||||
|
||||
ioStreams, _, _, _ := genericclioptions.NewTestIOStreams()
|
||||
@@ -357,7 +356,7 @@ func TestLabelErrors(t *testing.T) {
|
||||
|
||||
func TestLabelForResourceFromFile(t *testing.T) {
|
||||
pods, _, _ := testData()
|
||||
tf := cmdtesting.NewTestFactory()
|
||||
tf := cmdtesting.NewTestFactory().WithNamespace("test")
|
||||
defer tf.Cleanup()
|
||||
|
||||
codec := legacyscheme.Codecs.LegacyCodec(scheme.Scheme.PrioritizedVersionsAllGroups()...)
|
||||
@@ -388,7 +387,6 @@ func TestLabelForResourceFromFile(t *testing.T) {
|
||||
}
|
||||
}),
|
||||
}
|
||||
tf.Namespace = "test"
|
||||
tf.ClientConfigVal = defaultClientConfig()
|
||||
|
||||
ioStreams, _, buf, _ := genericclioptions.NewTestIOStreams()
|
||||
@@ -411,7 +409,7 @@ func TestLabelForResourceFromFile(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestLabelLocal(t *testing.T) {
|
||||
tf := cmdtesting.NewTestFactory()
|
||||
tf := cmdtesting.NewTestFactory().WithNamespace("test")
|
||||
defer tf.Cleanup()
|
||||
|
||||
tf.UnstructuredClient = &fake.RESTClient{
|
||||
@@ -421,7 +419,6 @@ func TestLabelLocal(t *testing.T) {
|
||||
return nil, nil
|
||||
}),
|
||||
}
|
||||
tf.Namespace = "test"
|
||||
tf.ClientConfigVal = defaultClientConfig()
|
||||
|
||||
ioStreams, _, buf, _ := genericclioptions.NewTestIOStreams()
|
||||
@@ -446,7 +443,7 @@ func TestLabelLocal(t *testing.T) {
|
||||
|
||||
func TestLabelMultipleObjects(t *testing.T) {
|
||||
pods, _, _ := testData()
|
||||
tf := cmdtesting.NewTestFactory()
|
||||
tf := cmdtesting.NewTestFactory().WithNamespace("test")
|
||||
defer tf.Cleanup()
|
||||
|
||||
codec := legacyscheme.Codecs.LegacyCodec(scheme.Scheme.PrioritizedVersionsAllGroups()...)
|
||||
@@ -479,7 +476,6 @@ func TestLabelMultipleObjects(t *testing.T) {
|
||||
}
|
||||
}),
|
||||
}
|
||||
tf.Namespace = "test"
|
||||
tf.ClientConfigVal = defaultClientConfig()
|
||||
|
||||
ioStreams, _, buf, _ := genericclioptions.NewTestIOStreams()
|
||||
|
Reference in New Issue
Block a user