Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
18464d47
Unverified
Commit
18464d47
authored
Dec 28, 2018
by
Kubernetes Prow Robot
Committed by
GitHub
Dec 28, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #71599 from bouk/fake-eviction
client-go/testing: Straighten out fake implementation of Evictions
parents
7d855464
869adf8b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
fake_eviction_expansion.go
...ed/policy/internalversion/fake/fake_eviction_expansion.go
+4
-2
fake_pod_expansion.go
...nt-go/kubernetes/typed/core/v1/fake/fake_pod_expansion.go
+1
-0
fake_eviction_expansion.go
...etes/typed/policy/v1beta1/fake/fake_eviction_expansion.go
+4
-3
No files found.
pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/fake_eviction_expansion.go
View file @
18464d47
...
@@ -23,11 +23,13 @@ import (
...
@@ -23,11 +23,13 @@ import (
)
)
func
(
c
*
FakeEvictions
)
Evict
(
eviction
*
policy
.
Eviction
)
error
{
func
(
c
*
FakeEvictions
)
Evict
(
eviction
*
policy
.
Eviction
)
error
{
action
:=
core
.
Get
ActionImpl
{}
action
:=
core
.
Create
ActionImpl
{}
action
.
Verb
=
"
post
"
action
.
Verb
=
"
create
"
action
.
Namespace
=
c
.
ns
action
.
Namespace
=
c
.
ns
action
.
Resource
=
schema
.
GroupVersionResource
{
Group
:
""
,
Version
:
""
,
Resource
:
"pods"
}
action
.
Resource
=
schema
.
GroupVersionResource
{
Group
:
""
,
Version
:
""
,
Resource
:
"pods"
}
action
.
Subresource
=
"eviction"
action
.
Subresource
=
"eviction"
action
.
Object
=
eviction
_
,
err
:=
c
.
Fake
.
Invokes
(
action
,
eviction
)
_
,
err
:=
c
.
Fake
.
Invokes
(
action
,
eviction
)
return
err
return
err
}
}
staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod_expansion.go
View file @
18464d47
...
@@ -60,6 +60,7 @@ func (c *FakePods) GetLogs(name string, opts *v1.PodLogOptions) *restclient.Requ
...
@@ -60,6 +60,7 @@ func (c *FakePods) GetLogs(name string, opts *v1.PodLogOptions) *restclient.Requ
func
(
c
*
FakePods
)
Evict
(
eviction
*
policy
.
Eviction
)
error
{
func
(
c
*
FakePods
)
Evict
(
eviction
*
policy
.
Eviction
)
error
{
action
:=
core
.
CreateActionImpl
{}
action
:=
core
.
CreateActionImpl
{}
action
.
Verb
=
"create"
action
.
Verb
=
"create"
action
.
Namespace
=
c
.
ns
action
.
Resource
=
podsResource
action
.
Resource
=
podsResource
action
.
Subresource
=
"eviction"
action
.
Subresource
=
"eviction"
action
.
Object
=
eviction
action
.
Object
=
eviction
...
...
staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_eviction_expansion.go
View file @
18464d47
...
@@ -23,12 +23,13 @@ import (
...
@@ -23,12 +23,13 @@ import (
)
)
func
(
c
*
FakeEvictions
)
Evict
(
eviction
*
policy
.
Eviction
)
error
{
func
(
c
*
FakeEvictions
)
Evict
(
eviction
*
policy
.
Eviction
)
error
{
action
:=
core
.
Get
ActionImpl
{}
action
:=
core
.
Create
ActionImpl
{}
action
.
Verb
=
"
post
"
action
.
Verb
=
"
create
"
action
.
Namespace
=
c
.
ns
action
.
Namespace
=
c
.
ns
action
.
Resource
=
schema
.
GroupVersionResource
{
Group
:
""
,
Version
:
"v1"
,
Resource
:
"pods"
}
action
.
Resource
=
schema
.
GroupVersionResource
{
Group
:
""
,
Version
:
"v1"
,
Resource
:
"pods"
}
action
.
Subresource
=
"eviction"
action
.
Subresource
=
"eviction"
action
.
Name
=
eviction
.
Name
action
.
Object
=
eviction
_
,
err
:=
c
.
Fake
.
Invokes
(
action
,
eviction
)
_
,
err
:=
c
.
Fake
.
Invokes
(
action
,
eviction
)
return
err
return
err
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment