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
0773eb03
Commit
0773eb03
authored
Nov 30, 2015
by
Wojciech Tyczynski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix resize_nodes.go test.
parent
c1af9dcb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
resize_nodes.go
test/e2e/resize_nodes.go
+3
-1
util.go
test/e2e/util.go
+4
-1
No files found.
test/e2e/resize_nodes.go
View file @
0773eb03
...
@@ -185,6 +185,7 @@ func rcByNamePort(name string, replicas int, image string, port int, labels map[
...
@@ -185,6 +185,7 @@ func rcByNamePort(name string, replicas int, image string, port int, labels map[
func
rcByNameContainer
(
name
string
,
replicas
int
,
image
string
,
labels
map
[
string
]
string
,
c
api
.
Container
)
*
api
.
ReplicationController
{
func
rcByNameContainer
(
name
string
,
replicas
int
,
image
string
,
labels
map
[
string
]
string
,
c
api
.
Container
)
*
api
.
ReplicationController
{
// Add "name": name to the labels, overwriting if it exists.
// Add "name": name to the labels, overwriting if it exists.
labels
[
"name"
]
=
name
labels
[
"name"
]
=
name
gracePeriod
:=
int64
(
0
)
return
&
api
.
ReplicationController
{
return
&
api
.
ReplicationController
{
TypeMeta
:
unversioned
.
TypeMeta
{
TypeMeta
:
unversioned
.
TypeMeta
{
Kind
:
"ReplicationController"
,
Kind
:
"ReplicationController"
,
...
@@ -203,7 +204,8 @@ func rcByNameContainer(name string, replicas int, image string, labels map[strin
...
@@ -203,7 +204,8 @@ func rcByNameContainer(name string, replicas int, image string, labels map[strin
Labels
:
labels
,
Labels
:
labels
,
},
},
Spec
:
api
.
PodSpec
{
Spec
:
api
.
PodSpec
{
Containers
:
[]
api
.
Container
{
c
},
Containers
:
[]
api
.
Container
{
c
},
TerminationGracePeriodSeconds
:
&
gracePeriod
,
},
},
},
},
},
},
...
...
test/e2e/util.go
View file @
0773eb03
...
@@ -768,7 +768,10 @@ func waitForPodToDisappear(c *client.Client, ns, podName string, label labels.Se
...
@@ -768,7 +768,10 @@ func waitForPodToDisappear(c *client.Client, ns, podName string, label labels.Se
// In case of failure or too long waiting time, an error is returned.
// In case of failure or too long waiting time, an error is returned.
func
waitForRCPodToDisappear
(
c
*
client
.
Client
,
ns
,
rcName
,
podName
string
)
error
{
func
waitForRCPodToDisappear
(
c
*
client
.
Client
,
ns
,
rcName
,
podName
string
)
error
{
label
:=
labels
.
SelectorFromSet
(
labels
.
Set
(
map
[
string
]
string
{
"name"
:
rcName
}))
label
:=
labels
.
SelectorFromSet
(
labels
.
Set
(
map
[
string
]
string
{
"name"
:
rcName
}))
return
waitForPodToDisappear
(
c
,
ns
,
podName
,
label
,
20
*
time
.
Second
,
5
*
time
.
Minute
)
// NodeController evicts pod after 5 minutes, so we need timeout greater than that.
// Additionally, there can be non-zero grace period, so we are setting 10 minutes
// to be on the safe size.
return
waitForPodToDisappear
(
c
,
ns
,
podName
,
label
,
20
*
time
.
Second
,
10
*
time
.
Minute
)
}
}
// waitForService waits until the service appears (exist == true), or disappears (exist == false)
// waitForService waits until the service appears (exist == true), or disappears (exist == false)
...
...
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