remove unneeded factory codec methods

This commit is contained in:
David Eads
2018-02-21 12:10:38 -05:00
parent be04e7c1b1
commit d8a5420b7c
76 changed files with 543 additions and 362 deletions

View File

@@ -24,13 +24,18 @@ import (
"k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/client-go/rest/fake"
"k8s.io/kubernetes/pkg/api/legacyscheme"
cmdtesting "k8s.io/kubernetes/pkg/kubectl/cmd/testing"
"k8s.io/kubernetes/pkg/kubectl/scheme"
)
func TestCreateNamespace(t *testing.T) {
namespaceObject := &v1.Namespace{}
namespaceObject.Name = "my-namespace"
f, tf, codec, ns := cmdtesting.NewAPIFactory()
f, tf := cmdtesting.NewAPIFactory()
codec := legacyscheme.Codecs.LegacyCodec(scheme.Versions...)
ns := legacyscheme.Codecs
tf.Client = &fake.RESTClient{
GroupVersion: schema.GroupVersion{Version: "v1"},
NegotiatedSerializer: ns,