mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
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:
parent
ebef8af8fe
commit
92be0b3f43
@ -91,22 +91,22 @@ func (client *FakeKubeClient) DeleteReplicationController(controller string) err
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (client *FakeKubeClient) GetService(name string) (api.Service, error) {
|
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
|
return api.Service{}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (client *FakeKubeClient) CreateService(controller api.Service) (api.Service, error) {
|
func (client *FakeKubeClient) CreateService(service api.Service) (api.Service, error) {
|
||||||
client.actions = append(client.actions, Action{action: "create-service", value: controller})
|
client.actions = append(client.actions, Action{action: "create-service", value: service})
|
||||||
return api.Service{}, nil
|
return api.Service{}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (client *FakeKubeClient) UpdateService(controller api.Service) (api.Service, error) {
|
func (client *FakeKubeClient) UpdateService(service api.Service) (api.Service, error) {
|
||||||
client.actions = append(client.actions, Action{action: "update-service", value: controller})
|
client.actions = append(client.actions, Action{action: "update-service", value: service})
|
||||||
return api.Service{}, nil
|
return api.Service{}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (client *FakeKubeClient) DeleteService(controller string) error {
|
func (client *FakeKubeClient) DeleteService(service string) error {
|
||||||
client.actions = append(client.actions, Action{action: "delete-service", value: controller})
|
client.actions = append(client.actions, Action{action: "delete-service", value: service})
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user