Merge pull request #63800 from wojtek-t/fix_fake_listers

Automatic merge from submit-queue (batch tested with PRs 63658, 63509, 63800, 63586, 63840). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix List in fake clients to propagate ListMeta

Kubernetes-commit: 765c49db41dbe067cfca5d83cf438fb02b3468b8
This commit is contained in:
Kubernetes Publisher
2018-05-15 14:23:16 -07:00
10 changed files with 133 additions and 133 deletions
@@ -334,7 +334,7 @@ func (c *Fake$.type|publicPlural$) List(opts $.ListOptions|raw$) (result *$.type
if label == nil {
label = $.Everything|raw$()
}
list := &$.type|raw$List{}
list := &$.type|raw$List{ListMeta: obj.(*$.type|raw$List).ListMeta}
for _, item := range obj.(*$.type|raw$List).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)