mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-14 14:18:59 +00:00
manually copy the fix the fake_pod_expansion.go
This commit is contained in:
@@ -18,6 +18,7 @@ package fake
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"k8s.io/client-go/1.5/pkg/api/v1"
|
"k8s.io/client-go/1.5/pkg/api/v1"
|
||||||
|
"k8s.io/client-go/1.5/pkg/apis/policy/v1alpha1"
|
||||||
"k8s.io/client-go/1.5/rest"
|
"k8s.io/client-go/1.5/rest"
|
||||||
"k8s.io/client-go/1.5/testing"
|
"k8s.io/client-go/1.5/testing"
|
||||||
)
|
)
|
||||||
@@ -44,3 +45,14 @@ func (c *FakePods) GetLogs(name string, opts *v1.PodLogOptions) *rest.Request {
|
|||||||
_, _ = c.Fake.Invokes(action, &v1.Pod{})
|
_, _ = c.Fake.Invokes(action, &v1.Pod{})
|
||||||
return &rest.Request{}
|
return &rest.Request{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *FakePods) Evict(eviction *v1alpha1.Eviction) error {
|
||||||
|
action := testing.CreateActionImpl{}
|
||||||
|
action.Verb = "create"
|
||||||
|
action.Resource = podsResource
|
||||||
|
action.Subresource = "eviction"
|
||||||
|
action.Object = eviction
|
||||||
|
|
||||||
|
_, err := c.Fake.Invokes(action, eviction)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user