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

@@ -20,8 +20,7 @@ import (
"reflect"
"testing"
"k8s.io/apimachinery/pkg/api/meta"
cmdtesting "k8s.io/kubernetes/pkg/kubectl/cmd/testing"
"k8s.io/kubernetes/pkg/kubectl/scheme"
)
func TestSplitAndParseResourceRequest(t *testing.T) {
@@ -57,7 +56,7 @@ func TestSplitAndParseResourceRequest(t *testing.T) {
},
}
mapper := getMapper()
mapper := scheme.Registry.RESTMapper(scheme.Versions...)
for _, test := range tests {
gotInResource, gotFieldsPath, err := SplitAndParseResourceRequest(test.inresource, mapper)
if err != nil {
@@ -73,9 +72,3 @@ func TestSplitAndParseResourceRequest(t *testing.T) {
}
}
}
func getMapper() meta.RESTMapper {
f, _, _, _ := cmdtesting.NewTestFactory()
mapper, _ := f.Object()
return mapper
}