Fix the wrong action being recorded on GetService

Fix the action recorded when GetService gets called on FakeKubeClient
Also fix parameter names (controller -> service)
This commit is contained in:
csrwng 2014-08-07 00:15:44 -04:00
parent ebef8af8fe
commit 92be0b3f43

View File

@ -91,22 +91,22 @@ func (client *FakeKubeClient) DeleteReplicationController(controller string) err
}
func (client *FakeKubeClient) GetService(name string) (api.Service, error) {
client.actions = append(client.actions, Action{action: "get-controller", value: name})
client.actions = append(client.actions, Action{action: "get-service", value: name})
return api.Service{}, nil
}
func (client *FakeKubeClient) CreateService(controller api.Service) (api.Service, error) {
client.actions = append(client.actions, Action{action: "create-service", value: controller})
func (client *FakeKubeClient) CreateService(service api.Service) (api.Service, error) {
client.actions = append(client.actions, Action{action: "create-service", value: service})
return api.Service{}, nil
}
func (client *FakeKubeClient) UpdateService(controller api.Service) (api.Service, error) {
client.actions = append(client.actions, Action{action: "update-service", value: controller})
func (client *FakeKubeClient) UpdateService(service api.Service) (api.Service, error) {
client.actions = append(client.actions, Action{action: "update-service", value: service})
return api.Service{}, nil
}
func (client *FakeKubeClient) DeleteService(controller string) error {
client.actions = append(client.actions, Action{action: "delete-service", value: controller})
func (client *FakeKubeClient) DeleteService(service string) error {
client.actions = append(client.actions, Action{action: "delete-service", value: service})
return nil
}