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
bdec7da4
Commit
bdec7da4
authored
Sep 16, 2015
by
Maciej Szulik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added NewUpdateSubresourceAction to testclient actions
parent
4b5c2253
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
21 deletions
+14
-21
actions.go
pkg/client/unversioned/testclient/actions.go
+11
-0
fake_persistent_volume_claims.go
...t/unversioned/testclient/fake_persistent_volume_claims.go
+1
-7
fake_pods.go
pkg/client/unversioned/testclient/fake_pods.go
+1
-7
fake_resource_quotas.go
pkg/client/unversioned/testclient/fake_resource_quotas.go
+1
-7
No files found.
pkg/client/unversioned/testclient/actions.go
View file @
bdec7da4
...
@@ -100,6 +100,17 @@ func NewUpdateAction(resource, namespace string, object runtime.Object) UpdateAc
...
@@ -100,6 +100,17 @@ func NewUpdateAction(resource, namespace string, object runtime.Object) UpdateAc
return
action
return
action
}
}
func
NewUpdateSubresourceAction
(
resource
,
subresource
,
namespace
string
,
object
runtime
.
Object
)
UpdateActionImpl
{
action
:=
UpdateActionImpl
{}
action
.
Verb
=
"update"
action
.
Resource
=
resource
action
.
Subresource
=
subresource
action
.
Namespace
=
namespace
action
.
Object
=
object
return
action
}
func
NewRootDeleteAction
(
resource
,
name
string
)
DeleteActionImpl
{
func
NewRootDeleteAction
(
resource
,
name
string
)
DeleteActionImpl
{
action
:=
DeleteActionImpl
{}
action
:=
DeleteActionImpl
{}
action
.
Verb
=
"delete"
action
.
Verb
=
"delete"
...
...
pkg/client/unversioned/testclient/fake_persistent_volume_claims.go
View file @
bdec7da4
...
@@ -74,13 +74,7 @@ func (c *FakePersistentVolumeClaims) Watch(label labels.Selector, field fields.S
...
@@ -74,13 +74,7 @@ func (c *FakePersistentVolumeClaims) Watch(label labels.Selector, field fields.S
}
}
func
(
c
*
FakePersistentVolumeClaims
)
UpdateStatus
(
claim
*
api
.
PersistentVolumeClaim
)
(
*
api
.
PersistentVolumeClaim
,
error
)
{
func
(
c
*
FakePersistentVolumeClaims
)
UpdateStatus
(
claim
*
api
.
PersistentVolumeClaim
)
(
*
api
.
PersistentVolumeClaim
,
error
)
{
action
:=
UpdateActionImpl
{}
obj
,
err
:=
c
.
Fake
.
Invokes
(
NewUpdateSubresourceAction
(
"persistentvolumeclaims"
,
"status"
,
c
.
Namespace
,
claim
),
claim
)
action
.
Verb
=
"update"
action
.
Resource
=
"persistentvolumeclaims"
action
.
Subresource
=
"status"
action
.
Object
=
claim
obj
,
err
:=
c
.
Fake
.
Invokes
(
action
,
claim
)
if
obj
==
nil
{
if
obj
==
nil
{
return
nil
,
err
return
nil
,
err
}
}
...
...
pkg/client/unversioned/testclient/fake_pods.go
View file @
bdec7da4
...
@@ -92,13 +92,7 @@ func (c *FakePods) Bind(binding *api.Binding) error {
...
@@ -92,13 +92,7 @@ func (c *FakePods) Bind(binding *api.Binding) error {
}
}
func
(
c
*
FakePods
)
UpdateStatus
(
pod
*
api
.
Pod
)
(
*
api
.
Pod
,
error
)
{
func
(
c
*
FakePods
)
UpdateStatus
(
pod
*
api
.
Pod
)
(
*
api
.
Pod
,
error
)
{
action
:=
UpdateActionImpl
{}
obj
,
err
:=
c
.
Fake
.
Invokes
(
NewUpdateSubresourceAction
(
"pods"
,
"status"
,
c
.
Namespace
,
pod
),
pod
)
action
.
Verb
=
"update"
action
.
Resource
=
"pods"
action
.
Subresource
=
"status"
action
.
Object
=
pod
obj
,
err
:=
c
.
Fake
.
Invokes
(
action
,
pod
)
if
obj
==
nil
{
if
obj
==
nil
{
return
nil
,
err
return
nil
,
err
}
}
...
...
pkg/client/unversioned/testclient/fake_resource_quotas.go
View file @
bdec7da4
...
@@ -76,13 +76,7 @@ func (c *FakeResourceQuotas) Watch(label labels.Selector, field fields.Selector,
...
@@ -76,13 +76,7 @@ func (c *FakeResourceQuotas) Watch(label labels.Selector, field fields.Selector,
}
}
func
(
c
*
FakeResourceQuotas
)
UpdateStatus
(
resourceQuota
*
api
.
ResourceQuota
)
(
*
api
.
ResourceQuota
,
error
)
{
func
(
c
*
FakeResourceQuotas
)
UpdateStatus
(
resourceQuota
*
api
.
ResourceQuota
)
(
*
api
.
ResourceQuota
,
error
)
{
action
:=
UpdateActionImpl
{}
obj
,
err
:=
c
.
Fake
.
Invokes
(
NewUpdateSubresourceAction
(
"resourcequotas"
,
"status"
,
c
.
Namespace
,
resourceQuota
),
resourceQuota
)
action
.
Verb
=
"update"
action
.
Resource
=
"resourcequotas"
action
.
Subresource
=
"status"
action
.
Object
=
resourceQuota
obj
,
err
:=
c
.
Fake
.
Invokes
(
action
,
resourceQuota
)
if
obj
==
nil
{
if
obj
==
nil
{
return
nil
,
err
return
nil
,
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