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
b46cbc31
Commit
b46cbc31
authored
Feb 13, 2019
by
s-ito-ts
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add e2e test for scale sub-resource of statefulsets
parent
a92729a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
statefulset.go
test/e2e/apps/statefulset.go
+3
-8
No files found.
test/e2e/apps/statefulset.go
View file @
b46cbc31
...
...
@@ -783,7 +783,7 @@ var _ = SIGDescribe("StatefulSet", func() {
return
nil
},
framework
.
StatefulPodTimeout
,
2
*
time
.
Second
)
.
Should
(
BeNil
())
})
/* Comment it for now until scale sub-resource is finalized in ref:pull/53679 for scale-sub resource specific comment.
It
(
"should have a working scale subresource"
,
func
()
{
By
(
"Creating statefulset "
+
ssName
+
" in namespace "
+
ns
)
ss
:=
framework
.
NewStatefulSet
(
ssName
,
ns
,
headlessSvcName
,
1
,
nil
,
nil
,
labels
)
...
...
@@ -795,10 +795,7 @@ var _ = SIGDescribe("StatefulSet", func() {
ss
=
sst
.
WaitForStatus
(
ss
)
By
(
"getting scale subresource"
)
scale := framework.NewStatefulSetScale(ss)
scaleResult := &appsv1beta2.Scale{}
err = c.AppsV1().RESTClient().Get().AbsPath("/apis/apps/v1").Namespace(ns).Resource("statefulsets").Name(ssName).SubResource("scale").Do().Into(scale)
scale
,
err
:=
c
.
AppsV1
()
.
StatefulSets
(
ns
)
.
GetScale
(
ssName
,
metav1
.
GetOptions
{})
if
err
!=
nil
{
framework
.
Failf
(
"Failed to get scale subresource: %v"
,
err
)
}
...
...
@@ -806,9 +803,8 @@ var _ = SIGDescribe("StatefulSet", func() {
Expect
(
scale
.
Status
.
Replicas
)
.
To
(
Equal
(
int32
(
1
)))
By
(
"updating a scale subresource"
)
scale.ResourceVersion = "" //unconditionally update to 2 replicas
scale
.
Spec
.
Replicas
=
2
err = c.AppsV1().RESTClient().Put().AbsPath("/apis/apps/v1").Namespace(ns).Resource("statefulsets").Name(ssName).SubResource("scale").Body(scale).Do().Into(scaleResult
)
scaleResult
,
err
:=
c
.
AppsV1
()
.
StatefulSets
(
ns
)
.
UpdateScale
(
ssName
,
scale
)
if
err
!=
nil
{
framework
.
Failf
(
"Failed to put scale subresource: %v"
,
err
)
}
...
...
@@ -821,7 +817,6 @@ var _ = SIGDescribe("StatefulSet", func() {
}
Expect
(
*
(
ss
.
Spec
.
Replicas
))
.
To
(
Equal
(
int32
(
2
)))
})
*/
})
framework
.
KubeDescribe
(
"Deploy clustered applications [Feature:StatefulSet] [Slow]"
,
func
()
{
...
...
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