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
30b79da7
Commit
30b79da7
authored
Apr 09, 2018
by
wojtekt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix resize test for Regional Clusters
parent
0a5dcb63
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
13 deletions
+15
-13
resize_nodes.go
test/e2e/lifecycle/resize_nodes.go
+15
-13
No files found.
test/e2e/lifecycle/resize_nodes.go
View file @
30b79da7
...
@@ -63,6 +63,7 @@ var _ = SIGDescribe("Nodes [Disruptive]", func() {
...
@@ -63,6 +63,7 @@ var _ = SIGDescribe("Nodes [Disruptive]", func() {
// Slow issue #13323 (8 min)
// Slow issue #13323 (8 min)
Describe
(
"Resize [Slow]"
,
func
()
{
Describe
(
"Resize [Slow]"
,
func
()
{
var
originalNodeCount
int32
var
skipped
bool
var
skipped
bool
BeforeEach
(
func
()
{
BeforeEach
(
func
()
{
...
@@ -96,7 +97,8 @@ var _ = SIGDescribe("Nodes [Disruptive]", func() {
...
@@ -96,7 +97,8 @@ var _ = SIGDescribe("Nodes [Disruptive]", func() {
if
err
:=
framework
.
WaitForGroupSize
(
group
,
int32
(
framework
.
TestContext
.
CloudConfig
.
NumNodes
));
err
!=
nil
{
if
err
:=
framework
.
WaitForGroupSize
(
group
,
int32
(
framework
.
TestContext
.
CloudConfig
.
NumNodes
));
err
!=
nil
{
framework
.
Failf
(
"Couldn't restore the original node instance group size: %v"
,
err
)
framework
.
Failf
(
"Couldn't restore the original node instance group size: %v"
,
err
)
}
}
if
err
:=
framework
.
WaitForReadyNodes
(
c
,
framework
.
TestContext
.
CloudConfig
.
NumNodes
,
10
*
time
.
Minute
);
err
!=
nil
{
if
err
:=
framework
.
WaitForReadyNodes
(
c
,
int
(
originalNodeCount
),
10
*
time
.
Minute
);
err
!=
nil
{
framework
.
Failf
(
"Couldn't restore the original cluster size: %v"
,
err
)
framework
.
Failf
(
"Couldn't restore the original cluster size: %v"
,
err
)
}
}
// Many e2e tests assume that the cluster is fully healthy before they start. Wait until
// Many e2e tests assume that the cluster is fully healthy before they start. Wait until
...
@@ -114,9 +116,9 @@ var _ = SIGDescribe("Nodes [Disruptive]", func() {
...
@@ -114,9 +116,9 @@ var _ = SIGDescribe("Nodes [Disruptive]", func() {
name
:=
"my-hostname-delete-node"
name
:=
"my-hostname-delete-node"
numNodes
,
err
:=
framework
.
NumberOfRegisteredNodes
(
c
)
numNodes
,
err
:=
framework
.
NumberOfRegisteredNodes
(
c
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
replicas
:
=
int32
(
numNodes
)
originalNodeCount
=
int32
(
numNodes
)
common
.
NewRCByName
(
c
,
ns
,
name
,
replicas
,
nil
)
common
.
NewRCByName
(
c
,
ns
,
name
,
originalNodeCount
,
nil
)
err
=
framework
.
VerifyPods
(
c
,
ns
,
name
,
true
,
replicas
)
err
=
framework
.
VerifyPods
(
c
,
ns
,
name
,
true
,
originalNodeCount
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
targetNumNodes
:=
int32
(
framework
.
TestContext
.
CloudConfig
.
NumNodes
-
1
)
targetNumNodes
:=
int32
(
framework
.
TestContext
.
CloudConfig
.
NumNodes
-
1
)
...
@@ -125,7 +127,7 @@ var _ = SIGDescribe("Nodes [Disruptive]", func() {
...
@@ -125,7 +127,7 @@ var _ = SIGDescribe("Nodes [Disruptive]", func() {
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
err
=
framework
.
WaitForGroupSize
(
group
,
targetNumNodes
)
err
=
framework
.
WaitForGroupSize
(
group
,
targetNumNodes
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
err
=
framework
.
WaitForReadyNodes
(
c
,
int
(
replicas
-
1
),
10
*
time
.
Minute
)
err
=
framework
.
WaitForReadyNodes
(
c
,
int
(
originalNodeCount
-
1
),
10
*
time
.
Minute
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
By
(
"waiting 1 minute for the watch in the podGC to catch up, remove any pods scheduled on "
+
By
(
"waiting 1 minute for the watch in the podGC to catch up, remove any pods scheduled on "
+
...
@@ -133,7 +135,7 @@ var _ = SIGDescribe("Nodes [Disruptive]", func() {
...
@@ -133,7 +135,7 @@ var _ = SIGDescribe("Nodes [Disruptive]", func() {
time
.
Sleep
(
time
.
Minute
)
time
.
Sleep
(
time
.
Minute
)
By
(
"verifying whether the pods from the removed node are recreated"
)
By
(
"verifying whether the pods from the removed node are recreated"
)
err
=
framework
.
VerifyPods
(
c
,
ns
,
name
,
true
,
replicas
)
err
=
framework
.
VerifyPods
(
c
,
ns
,
name
,
true
,
originalNodeCount
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
})
})
...
@@ -145,9 +147,9 @@ var _ = SIGDescribe("Nodes [Disruptive]", func() {
...
@@ -145,9 +147,9 @@ var _ = SIGDescribe("Nodes [Disruptive]", func() {
common
.
NewSVCByName
(
c
,
ns
,
name
)
common
.
NewSVCByName
(
c
,
ns
,
name
)
numNodes
,
err
:=
framework
.
NumberOfRegisteredNodes
(
c
)
numNodes
,
err
:=
framework
.
NumberOfRegisteredNodes
(
c
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
replicas
:
=
int32
(
numNodes
)
originalNodeCount
=
int32
(
numNodes
)
common
.
NewRCByName
(
c
,
ns
,
name
,
replicas
,
nil
)
common
.
NewRCByName
(
c
,
ns
,
name
,
originalNodeCount
,
nil
)
err
=
framework
.
VerifyPods
(
c
,
ns
,
name
,
true
,
replicas
)
err
=
framework
.
VerifyPods
(
c
,
ns
,
name
,
true
,
originalNodeCount
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
targetNumNodes
:=
int32
(
framework
.
TestContext
.
CloudConfig
.
NumNodes
+
1
)
targetNumNodes
:=
int32
(
framework
.
TestContext
.
CloudConfig
.
NumNodes
+
1
)
...
@@ -156,13 +158,13 @@ var _ = SIGDescribe("Nodes [Disruptive]", func() {
...
@@ -156,13 +158,13 @@ var _ = SIGDescribe("Nodes [Disruptive]", func() {
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
err
=
framework
.
WaitForGroupSize
(
group
,
targetNumNodes
)
err
=
framework
.
WaitForGroupSize
(
group
,
targetNumNodes
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
err
=
framework
.
WaitForReadyNodes
(
c
,
int
(
replicas
+
1
),
10
*
time
.
Minute
)
err
=
framework
.
WaitForReadyNodes
(
c
,
int
(
originalNodeCount
+
1
),
10
*
time
.
Minute
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
By
(
fmt
.
Sprintf
(
"increasing size of the replication controller to %d and verifying all pods are running"
,
replicas
+
1
))
By
(
fmt
.
Sprintf
(
"increasing size of the replication controller to %d and verifying all pods are running"
,
originalNodeCount
+
1
))
err
=
resizeRC
(
c
,
ns
,
name
,
replicas
+
1
)
err
=
resizeRC
(
c
,
ns
,
name
,
originalNodeCount
+
1
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
err
=
framework
.
VerifyPods
(
c
,
ns
,
name
,
true
,
replicas
+
1
)
err
=
framework
.
VerifyPods
(
c
,
ns
,
name
,
true
,
originalNodeCount
+
1
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
})
})
})
})
...
...
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