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
7167c474
Commit
7167c474
authored
Feb 22, 2018
by
Michelle Au
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more test cases for volume binding in the scheduler
parent
47b012ec
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
105 additions
and
26 deletions
+105
-26
BUILD
test/integration/scheduler/BUILD
+0
-1
util.go
test/integration/scheduler/util.go
+12
-0
volume_binding_test.go
test/integration/scheduler/volume_binding_test.go
+93
-25
No files found.
test/integration/scheduler/BUILD
View file @
7167c474
...
@@ -11,7 +11,6 @@ go_test(
...
@@ -11,7 +11,6 @@ go_test(
size = "large",
size = "large",
srcs = [
srcs = [
"extender_test.go",
"extender_test.go",
"local-pv-neg-affinity_test.go",
"main_test.go",
"main_test.go",
"predicates_test.go",
"predicates_test.go",
"preemption_test.go",
"preemption_test.go",
...
...
test/integration/scheduler/util.go
View file @
7167c474
...
@@ -362,6 +362,18 @@ func waitForPodToSchedule(cs clientset.Interface, pod *v1.Pod) error {
...
@@ -362,6 +362,18 @@ func waitForPodToSchedule(cs clientset.Interface, pod *v1.Pod) error {
return
waitForPodToScheduleWithTimeout
(
cs
,
pod
,
30
*
time
.
Second
)
return
waitForPodToScheduleWithTimeout
(
cs
,
pod
,
30
*
time
.
Second
)
}
}
// waitForPodUnscheduleWithTimeout waits for a pod to fail scheduling and returns
// an error if it does not become unschedulable within the given timeout.
func
waitForPodUnschedulableWithTimeout
(
cs
clientset
.
Interface
,
pod
*
v1
.
Pod
,
timeout
time
.
Duration
)
error
{
return
wait
.
Poll
(
100
*
time
.
Millisecond
,
timeout
,
podUnschedulable
(
cs
,
pod
.
Namespace
,
pod
.
Name
))
}
// waitForPodUnschedule waits for a pod to fail scheduling and returns
// an error if it does not become unschedulable within the timeout duration (30 seconds).
func
waitForPodUnschedulable
(
cs
clientset
.
Interface
,
pod
*
v1
.
Pod
)
error
{
return
waitForPodUnschedulableWithTimeout
(
cs
,
pod
,
30
*
time
.
Second
)
}
// deletePod deletes the given pod in the given namespace.
// deletePod deletes the given pod in the given namespace.
func
deletePod
(
cs
clientset
.
Interface
,
podName
string
,
nsName
string
)
error
{
func
deletePod
(
cs
clientset
.
Interface
,
podName
string
,
nsName
string
)
error
{
return
cs
.
CoreV1
()
.
Pods
(
nsName
)
.
Delete
(
podName
,
metav1
.
NewDeleteOptions
(
0
))
return
cs
.
CoreV1
()
.
Pods
(
nsName
)
.
Delete
(
podName
,
metav1
.
NewDeleteOptions
(
0
))
...
...
test/integration/scheduler/volume_binding_test.go
View file @
7167c474
This diff is collapsed.
Click to expand it.
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