mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-31 08:36:16 +00:00
Add WatchReplicationControllers to kubecfg's fake
This commit is contained in:
@@ -27,6 +27,7 @@ import (
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/watch"
|
||||
)
|
||||
|
||||
type Action struct {
|
||||
@@ -90,6 +91,11 @@ func (client *FakeKubeClient) DeleteReplicationController(controller string) err
|
||||
return nil
|
||||
}
|
||||
|
||||
func (client *FakeKubeClient) WatchReplicationControllers(label, field labels.Selector, resourceVersion uint64) (watch.Interface, error) {
|
||||
client.actions = append(client.actions, Action{action: "watch-controllers"})
|
||||
return watch.NewFake(), nil
|
||||
}
|
||||
|
||||
func (client *FakeKubeClient) GetService(name string) (api.Service, error) {
|
||||
client.actions = append(client.actions, Action{action: "get-service", value: name})
|
||||
return api.Service{}, nil
|
||||
|
Reference in New Issue
Block a user