mirror of
https://github.com/kubernetes/sample-controller.git
synced 2026-05-01 00:00:03 +08:00
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:
Generated
Vendored
+1
-1
@@ -62,7 +62,7 @@ func (c *FakeTestTypes) List(opts v1.ListOptions) (result *example.TestTypeList,
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &example.TestTypeList{}
|
||||
list := &example.TestTypeList{ListMeta: obj.(*example.TestTypeList).ListMeta}
|
||||
for _, item := range obj.(*example.TestTypeList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -62,7 +62,7 @@ func (c *FakeTestTypes) List(opts v1.ListOptions) (result *example2.TestTypeList
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &example2.TestTypeList{}
|
||||
list := &example2.TestTypeList{ListMeta: obj.(*example2.TestTypeList).ListMeta}
|
||||
for _, item := range obj.(*example2.TestTypeList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -62,7 +62,7 @@ func (c *FakeTestTypes) List(opts v1.ListOptions) (result *example_v1.TestTypeLi
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &example_v1.TestTypeList{}
|
||||
list := &example_v1.TestTypeList{ListMeta: obj.(*example_v1.TestTypeList).ListMeta}
|
||||
for _, item := range obj.(*example_v1.TestTypeList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -62,7 +62,7 @@ func (c *FakeTestTypes) List(opts v1.ListOptions) (result *example2_v1.TestTypeL
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &example2_v1.TestTypeList{}
|
||||
list := &example2_v1.TestTypeList{ListMeta: obj.(*example2_v1.TestTypeList).ListMeta}
|
||||
for _, item := range obj.(*example2_v1.TestTypeList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
|
||||
Reference in New Issue
Block a user