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
81a8efda
Commit
81a8efda
authored
Oct 12, 2016
by
deads2k
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix unfiltered comparison
parent
ea5afb9a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
deployment_controller_test.go
pkg/controller/deployment/deployment_controller_test.go
+6
-5
No files found.
pkg/controller/deployment/deployment_controller_test.go
View file @
81a8efda
...
...
@@ -194,14 +194,13 @@ func (f *fixture) run(deploymentName string) {
}
actions
:=
filterInformerActions
(
f
.
client
.
Actions
())
informerActions
:=
0
for
i
,
action
:=
range
actions
{
if
len
(
f
.
actions
)
+
informerActions
<
i
+
1
{
if
len
(
f
.
actions
)
<
i
+
1
{
f
.
t
.
Errorf
(
"%d unexpected actions: %+v"
,
len
(
actions
)
-
len
(
f
.
actions
),
actions
[
i
:
])
break
}
expectedAction
:=
f
.
actions
[
i
-
informerActions
]
expectedAction
:=
f
.
actions
[
i
]
if
!
expectedAction
.
Matches
(
action
.
GetVerb
(),
action
.
GetResource
()
.
Resource
)
{
f
.
t
.
Errorf
(
"Expected
\n\t
%#v
\n
got
\n\t
%#v"
,
expectedAction
,
action
)
continue
...
...
@@ -261,10 +260,12 @@ func TestDeploymentController_dontSyncDeploymentsWithEmptyPodSelector(t *testing
// We expect the deployment controller to not take action here since it's configuration
// is invalid, even though no replicasets exist that match it's selector.
controller
.
syncDeployment
(
fmt
.
Sprintf
(
"%s/%s"
,
d
.
ObjectMeta
.
Namespace
,
d
.
ObjectMeta
.
Name
))
if
len
(
fake
.
Actions
())
==
0
{
filteredActions
:=
filterInformerActions
(
fake
.
Actions
())
if
len
(
filteredActions
)
==
0
{
return
}
for
_
,
action
:=
range
filter
InformerActions
(
fake
.
Actions
())
{
for
_
,
action
:=
range
filter
edActions
{
t
.
Logf
(
"unexpected action: %#v"
,
action
)
}
t
.
Errorf
(
"expected deployment controller to not take action"
)
...
...
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