PartialObjectMetadataList should nest values, not pointers for Items
Typo during setting up PartialObjectMetadataList, it should be a slice of `PartialObjectMetadata`, not a slice of `*PartialObjectMetadata`. Kubernetes-commit: f25efd12e63f1d7db5f29fe28831ad0126200c0b
This commit is contained in:
parent
29140cf7a1
commit
196c34b775
|
@ -2378,7 +2378,7 @@ func TestGetPartialObjectMetadata(t *testing.T) {
|
|||
ResourceVersion: "10",
|
||||
SelfLink: "/test/link",
|
||||
},
|
||||
Items: []*metav1beta1.PartialObjectMetadata{
|
||||
Items: []metav1beta1.PartialObjectMetadata{
|
||||
{
|
||||
TypeMeta: metav1.TypeMeta{APIVersion: "meta.k8s.io/v1beta1", Kind: "PartialObjectMetadata"},
|
||||
ObjectMeta: metav1.ObjectMeta{Name: "foo1", Namespace: "ns1", CreationTimestamp: now, UID: types.UID("newer")},
|
||||
|
|
|
@ -220,7 +220,7 @@ func asPartialObjectMetadataList(result runtime.Object, groupVersion schema.Grou
|
|||
}
|
||||
partial := meta.AsPartialObjectMetadata(m)
|
||||
partial.GetObjectKind().SetGroupVersionKind(gvk)
|
||||
list.Items = append(list.Items, partial)
|
||||
list.Items = append(list.Items, *partial)
|
||||
return nil
|
||||
})
|
||||
if err != nil {
|
||||
|
@ -240,7 +240,7 @@ func asPartialObjectMetadataList(result runtime.Object, groupVersion schema.Grou
|
|||
}
|
||||
partial := meta.AsPartialObjectMetadata(m)
|
||||
partial.GetObjectKind().SetGroupVersionKind(gvk)
|
||||
list.Items = append(list.Items, partial)
|
||||
list.Items = append(list.Items, *partial)
|
||||
return nil
|
||||
})
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue