Switch to use pkg/apis/meta/v1/unstructured and the new interfaces

Avoid directly accessing an unstructured type if it is not required.
This commit is contained in:
Clayton Coleman
2016-12-03 23:30:51 -05:00
parent c30862a488
commit 42d410fdde
23 changed files with 123 additions and 126 deletions

View File

@@ -34,13 +34,6 @@ func TestDecodeList(t *testing.T) {
Raw: []byte(`{"kind":"Pod","apiVersion":"` + registered.GroupOrDie(api.GroupName).GroupVersion.String() + `","metadata":{"name":"test"}}`),
ContentType: runtime.ContentTypeJSON,
},
&runtime.Unstructured{
Object: map[string]interface{}{
"kind": "Foo",
"apiVersion": "Bar",
"test": "value",
},
},
},
}
if errs := runtime.DecodeList(pl.Items, testapi.Default.Codec()); len(errs) != 0 {