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:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user