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
b0560cba
Commit
b0560cba
authored
Feb 09, 2016
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #20686 from dchen1107/test1
Auto commit by PR queue bot
parents
e9e3f7b9
d65cab42
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
scheduler_predicates.go
test/e2e/scheduler_predicates.go
+12
-1
No files found.
test/e2e/scheduler_predicates.go
View file @
b0560cba
...
...
@@ -179,6 +179,7 @@ func waitForStableCluster(c *client.Client) int {
var
_
=
Describe
(
"SchedulerPredicates [Serial]"
,
func
()
{
var
c
*
client
.
Client
var
nodeList
*
api
.
NodeList
var
systemPodsNo
int
var
totalPodCapacity
int64
var
RCName
string
var
ns
string
...
...
@@ -198,6 +199,16 @@ var _ = Describe("SchedulerPredicates [Serial]", func() {
c
=
framework
.
Client
ns
=
framework
.
Namespace
.
Name
nodeList
=
ListSchedulableNodesOrDie
(
c
)
// Every test case in this suite assumes that cluster add-on pods stay stable and
// cannot be run in parallel with any other test that touches Nodes or Pods.
// It is so because we need to have precise control on what's running in the cluster.
systemPods
,
err
:=
c
.
Pods
(
api
.
NamespaceSystem
)
.
List
(
api
.
ListOptions
{})
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
systemPodsNo
=
len
(
systemPods
.
Items
)
err
=
waitForPodsRunningReady
(
api
.
NamespaceSystem
,
systemPodsNo
,
podReadyBeforeTimeout
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
})
// This test verifies that max-pods flag works as advertised. It assumes that cluster add-on pods stay stable
...
...
@@ -284,7 +295,7 @@ var _ = Describe("SchedulerPredicates [Serial]", func() {
_
,
found
:=
nodeToCapacityMap
[
pod
.
Spec
.
NodeName
]
Expect
(
found
)
.
To
(
Equal
(
true
))
if
pod
.
Status
.
Phase
==
api
.
PodRunning
{
Logf
(
"Pod %v requesting
capacity
%v on Node %v"
,
pod
.
Name
,
getRequestedCPU
(
pod
),
pod
.
Spec
.
NodeName
)
Logf
(
"Pod %v requesting
resource
%v on Node %v"
,
pod
.
Name
,
getRequestedCPU
(
pod
),
pod
.
Spec
.
NodeName
)
nodeToCapacityMap
[
pod
.
Spec
.
NodeName
]
-=
getRequestedCPU
(
pod
)
}
}
...
...
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