mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-26 12:02:34 +00:00
Fix fakeclient List
This commit is contained in:
parent
b71fe87a5c
commit
a4c35f31f2
@ -334,7 +334,7 @@ func (c *Fake$.type|publicPlural$) List(opts $.ListOptions|raw$) (result *$.type
|
|||||||
if label == nil {
|
if label == nil {
|
||||||
label = $.Everything|raw$()
|
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 {
|
for _, item := range obj.(*$.type|raw$List).Items {
|
||||||
if label.Matches(labels.Set(item.Labels)) {
|
if label.Matches(labels.Set(item.Labels)) {
|
||||||
list.Items = append(list.Items, item)
|
list.Items = append(list.Items, item)
|
||||||
|
Loading…
Reference in New Issue
Block a user