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
aadd5ac8
Commit
aadd5ac8
authored
Oct 12, 2016
by
Kubernetes Submit Queue
Committed by
GitHub
Oct 12, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #34618 from mwielgus/more-dep-tests
Automatic merge from submit-queue Add non default replica preferences test to federation depoyment tests cc: @quinton-hole
parents
44337ba8
493481ef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
deploymentcontroller_test.go
...ration-controller/deployment/deploymentcontroller_test.go
+12
-0
No files found.
federation/pkg/federation-controller/deployment/deploymentcontroller_test.go
View file @
aadd5ac8
...
...
@@ -147,6 +147,18 @@ func TestDeploymentController(t *testing.T) {
clusterWatch
.
Add
(
cluster2
)
assert
.
NoError
(
t
,
CheckObjectFromChan
(
cluster1UpdateChan
,
checkDeployment
(
dep1
,
*
dep1
.
Spec
.
Replicas
/
2
)))
assert
.
NoError
(
t
,
CheckObjectFromChan
(
cluster2CreateChan
,
checkDeployment
(
dep1
,
*
dep1
.
Spec
.
Replicas
/
2
)))
// Add new deployment with non-default replica placement preferences.
dep2
:=
newDeploymentWithReplicas
(
"deployment2"
,
9
)
dep2
.
Annotations
=
make
(
map
[
string
]
string
)
dep2
.
Annotations
[
FedDeploymentPreferencesAnnotation
]
=
`{"rebalance": true,
"clusters": {
"cluster1": {"weight": 2},
"cluster2": {"weight": 1}
}}`
deploymentsWatch
.
Add
(
dep2
)
assert
.
NoError
(
t
,
CheckObjectFromChan
(
cluster1CreateChan
,
checkDeployment
(
dep2
,
6
)))
assert
.
NoError
(
t
,
CheckObjectFromChan
(
cluster2CreateChan
,
checkDeployment
(
dep2
,
3
)))
}
func
GetDeploymentFromChan
(
c
chan
runtime
.
Object
)
*
extensionsv1
.
Deployment
{
...
...
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