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
671b5982
Commit
671b5982
authored
Jan 05, 2016
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #18125 from janetkuo/rollover-test
Auto commit by PR queue bot
parents
547bf75b
6a8d5e75
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
deployment.go
test/e2e/deployment.go
+0
-0
util.go
test/e2e/util.go
+16
-1
No files found.
test/e2e/deployment.go
View file @
671b5982
This diff is collapsed.
Click to expand it.
test/e2e/util.go
View file @
671b5982
...
@@ -1952,7 +1952,7 @@ func waitForDeploymentStatus(c *client.Client, ns, deploymentName string, desire
...
@@ -1952,7 +1952,7 @@ func waitForDeploymentStatus(c *client.Client, ns, deploymentName string, desire
return
false
,
fmt
.
Errorf
(
"old RCs are not fully scaled down"
)
return
false
,
fmt
.
Errorf
(
"old RCs are not fully scaled down"
)
}
}
if
deploymentutil
.
GetReplicaCountForRCs
([]
*
api
.
ReplicationController
{
newRC
})
!=
desiredUpdatedReplicas
{
if
deploymentutil
.
GetReplicaCountForRCs
([]
*
api
.
ReplicationController
{
newRC
})
!=
desiredUpdatedReplicas
{
return
false
,
fmt
.
Errorf
(
"new RC
s
is not fully scaled up"
)
return
false
,
fmt
.
Errorf
(
"new RC is not fully scaled up"
)
}
}
return
true
,
nil
return
true
,
nil
}
}
...
@@ -1979,6 +1979,21 @@ func waitForEvents(c *client.Client, ns string, objOrRef runtime.Object, desired
...
@@ -1979,6 +1979,21 @@ func waitForEvents(c *client.Client, ns string, objOrRef runtime.Object, desired
})
})
}
}
// Waits for the number of events on the given object to be at least a desired count.
func
waitForPartialEvents
(
c
*
client
.
Client
,
ns
string
,
objOrRef
runtime
.
Object
,
atLeastEventsCount
int
)
error
{
return
wait
.
Poll
(
poll
,
5
*
time
.
Minute
,
func
()
(
bool
,
error
)
{
events
,
err
:=
c
.
Events
(
ns
)
.
Search
(
objOrRef
)
if
err
!=
nil
{
return
false
,
fmt
.
Errorf
(
"error in listing events: %s"
,
err
)
}
eventsCount
:=
len
(
events
.
Items
)
if
eventsCount
>=
atLeastEventsCount
{
return
true
,
nil
}
return
false
,
nil
})
}
// FailedContainers inspects all containers in a pod and returns failure
// FailedContainers inspects all containers in a pod and returns failure
// information for containers that have failed or been restarted.
// information for containers that have failed or been restarted.
// A map is returned where the key is the containerID and the value is a
// A map is returned where the key is the containerID and the value is a
...
...
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