Add WatchReplicationControllers to kubecfg's fake

This commit is contained in:
Daniel Smith
2014-08-05 16:20:15 -07:00
parent 85ff1d3e7f
commit 51caf759c3

View File

@@ -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