mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-09 13:12:20 +00:00
Add context object in test cases flows
This commit is contained in:
@@ -22,6 +22,8 @@ import (
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/watch"
|
||||
|
||||
"code.google.com/p/go.net/context"
|
||||
)
|
||||
|
||||
type PodRegistry struct {
|
||||
@@ -57,7 +59,7 @@ func (r *PodRegistry) ListPodsPredicate(filter func(*api.Pod) bool) (*api.PodLis
|
||||
return &pods, nil
|
||||
}
|
||||
|
||||
func (r *PodRegistry) ListPods(selector labels.Selector) (*api.PodList, error) {
|
||||
func (r *PodRegistry) ListPods(ctx context.Context, selector labels.Selector) (*api.PodList, error) {
|
||||
return r.ListPodsPredicate(func(pod *api.Pod) bool {
|
||||
return selector.Matches(labels.Set(pod.Labels))
|
||||
})
|
||||
|
Reference in New Issue
Block a user