Commit 869adf8b authored by Bouke van der Bijl's avatar Bouke van der Bijl

client-go/testing: Straighten out fake implementation of Evictions

Make Evictions the same between Policyv1beta1 and Corev1
parent b97092ca
......@@ -23,11 +23,13 @@ import (
)
func (c *FakeEvictions) Evict(eviction *policy.Eviction) error {
action := core.GetActionImpl{}
action.Verb = "post"
action := core.CreateActionImpl{}
action.Verb = "create"
action.Namespace = c.ns
action.Resource = schema.GroupVersionResource{Group: "", Version: "", Resource: "pods"}
action.Subresource = "eviction"
action.Object = eviction
_, err := c.Fake.Invokes(action, eviction)
return err
}
......@@ -60,6 +60,7 @@ func (c *FakePods) GetLogs(name string, opts *v1.PodLogOptions) *restclient.Requ
func (c *FakePods) Evict(eviction *policy.Eviction) error {
action := core.CreateActionImpl{}
action.Verb = "create"
action.Namespace = c.ns
action.Resource = podsResource
action.Subresource = "eviction"
action.Object = eviction
......
......@@ -23,12 +23,13 @@ import (
)
func (c *FakeEvictions) Evict(eviction *policy.Eviction) error {
action := core.GetActionImpl{}
action.Verb = "post"
action := core.CreateActionImpl{}
action.Verb = "create"
action.Namespace = c.ns
action.Resource = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "pods"}
action.Subresource = "eviction"
action.Name = eviction.Name
action.Object = eviction
_, err := c.Fake.Invokes(action, eviction)
return err
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment