mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-29 13:24:42 +00:00
fix after rebase
This commit is contained in:
parent
64b419072f
commit
5a1a793784
@ -33,13 +33,13 @@ func MakeMockPodRegistry(pods []api.Pod) *MockPodRegistry {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (registry *MockPodRegistry) ListPods(query labels.Query) ([]api.Pod, error) {
|
func (registry *MockPodRegistry) ListPods(selector labels.Selector) ([]api.Pod, error) {
|
||||||
if registry.err != nil {
|
if registry.err != nil {
|
||||||
return registry.pods, registry.err
|
return registry.pods, registry.err
|
||||||
}
|
}
|
||||||
var filtered []api.Pod
|
var filtered []api.Pod
|
||||||
for _, pod := range registry.pods {
|
for _, pod := range registry.pods {
|
||||||
if query.Matches(labels.Set(pod.Labels)) {
|
if selector.Matches(labels.Set(pod.Labels)) {
|
||||||
filtered = append(filtered, pod)
|
filtered = append(filtered, pod)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user