mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-28 04:53:11 +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 {
|
||||
return registry.pods, registry.err
|
||||
}
|
||||
var filtered []api.Pod
|
||||
for _, pod := range registry.pods {
|
||||
if query.Matches(labels.Set(pod.Labels)) {
|
||||
if selector.Matches(labels.Set(pod.Labels)) {
|
||||
filtered = append(filtered, pod)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user