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
34024438
Commit
34024438
authored
May 31, 2017
by
Guangya Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a new test case for daemoncontroller.
This patch added a new test case of daemonSet with node selector, matching some nodes, and launch pods on all the nodes.
parent
c79df643
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
daemoncontroller_test.go
pkg/controller/daemon/daemoncontroller_test.go
+11
-0
No files found.
pkg/controller/daemon/daemoncontroller_test.go
View file @
34024438
...
@@ -787,6 +787,17 @@ func TestInconsistentNameSelectorDaemonSetDoesNothing(t *testing.T) {
...
@@ -787,6 +787,17 @@ func TestInconsistentNameSelectorDaemonSetDoesNothing(t *testing.T) {
syncAndValidateDaemonSets
(
t
,
manager
,
ds
,
podControl
,
0
,
0
)
syncAndValidateDaemonSets
(
t
,
manager
,
ds
,
podControl
,
0
,
0
)
}
}
// DaemonSet with node selector, matching some nodes, should launch pods on all the nodes.
func
TestSelectorDaemonSetLaunchesPods
(
t
*
testing
.
T
)
{
ds
:=
newDaemonSet
(
"foo"
)
ds
.
Spec
.
Template
.
Spec
.
NodeSelector
=
simpleNodeLabel
manager
,
podControl
,
_
:=
newTestController
(
ds
)
addNodes
(
manager
.
nodeStore
,
0
,
4
,
nil
)
addNodes
(
manager
.
nodeStore
,
4
,
3
,
simpleNodeLabel
)
manager
.
dsStore
.
Add
(
ds
)
syncAndValidateDaemonSets
(
t
,
manager
,
ds
,
podControl
,
3
,
0
)
}
// Daemon with node affinity should launch pods on nodes matching affinity.
// Daemon with node affinity should launch pods on nodes matching affinity.
func
TestNodeAffinityDaemonLaunchesPods
(
t
*
testing
.
T
)
{
func
TestNodeAffinityDaemonLaunchesPods
(
t
*
testing
.
T
)
{
daemon
:=
newDaemonSet
(
"foo"
)
daemon
:=
newDaemonSet
(
"foo"
)
...
...
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