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
f6a3966a
Commit
f6a3966a
authored
Aug 19, 2015
by
Piotr Szczesniak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added clean up to scheduler-predicates
parent
b5a4a548
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
scheduler_predicates.go
test/e2e/scheduler_predicates.go
+13
-0
No files found.
test/e2e/scheduler_predicates.go
View file @
f6a3966a
...
@@ -124,6 +124,16 @@ func verifyResult(c *client.Client, podName string, ns string, oldNotRunning int
...
@@ -124,6 +124,16 @@ func verifyResult(c *client.Client, podName string, ns string, oldNotRunning int
Expect
(
schedEvents
.
Items
)
.
ToNot
(
BeEmpty
(),
printOnce
(
fmt
.
Sprintf
(
"Pods found in the cluster: %#v"
,
allPods
)))
Expect
(
schedEvents
.
Items
)
.
ToNot
(
BeEmpty
(),
printOnce
(
fmt
.
Sprintf
(
"Pods found in the cluster: %#v"
,
allPods
)))
}
}
func
cleanupPods
(
c
*
client
.
Client
,
ns
string
)
{
By
(
"Removing all pods in namespace "
+
ns
)
pods
,
err
:=
c
.
Pods
(
ns
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
expectNoError
(
err
)
opt
:=
api
.
NewDeleteOptions
(
0
)
for
_
,
p
:=
range
pods
.
Items
{
expectNoError
(
c
.
Pods
(
ns
)
.
Delete
(
p
.
ObjectMeta
.
Name
,
opt
))
}
}
var
_
=
Describe
(
"SchedulerPredicates"
,
func
()
{
var
_
=
Describe
(
"SchedulerPredicates"
,
func
()
{
var
c
*
client
.
Client
var
c
*
client
.
Client
var
nodeList
*
api
.
NodeList
var
nodeList
*
api
.
NodeList
...
@@ -228,6 +238,7 @@ var _ = Describe("SchedulerPredicates", func() {
...
@@ -228,6 +238,7 @@ var _ = Describe("SchedulerPredicates", func() {
time
.
Sleep
(
10
*
time
.
Second
)
time
.
Sleep
(
10
*
time
.
Second
)
verifyResult
(
c
,
podName
,
ns
,
currentlyDeadPods
)
verifyResult
(
c
,
podName
,
ns
,
currentlyDeadPods
)
cleanupPods
(
c
,
ns
)
})
})
// This test verifies we don't allow scheduling of pods in a way that sum of limits of pods is greater than machines capacit.
// This test verifies we don't allow scheduling of pods in a way that sum of limits of pods is greater than machines capacit.
...
@@ -316,6 +327,7 @@ var _ = Describe("SchedulerPredicates", func() {
...
@@ -316,6 +327,7 @@ var _ = Describe("SchedulerPredicates", func() {
time
.
Sleep
(
10
*
time
.
Second
)
time
.
Sleep
(
10
*
time
.
Second
)
verifyResult
(
c
,
podName
,
ns
,
currentlyDeadPods
)
verifyResult
(
c
,
podName
,
ns
,
currentlyDeadPods
)
cleanupPods
(
c
,
ns
)
})
})
// Test Nodes does not have any label, hence it should be impossible to schedule Pod with
// Test Nodes does not have any label, hence it should be impossible to schedule Pod with
...
@@ -355,5 +367,6 @@ var _ = Describe("SchedulerPredicates", func() {
...
@@ -355,5 +367,6 @@ var _ = Describe("SchedulerPredicates", func() {
time
.
Sleep
(
10
*
time
.
Second
)
time
.
Sleep
(
10
*
time
.
Second
)
verifyResult
(
c
,
podName
,
ns
,
currentlyDeadPods
)
verifyResult
(
c
,
podName
,
ns
,
currentlyDeadPods
)
cleanupPods
(
c
,
ns
)
})
})
})
})
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