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
efdcd9f8
Commit
efdcd9f8
authored
Sep 02, 2015
by
Abhi Shah
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13519 from ironcladlou/test-fix
Refactor test to use new fake reactors
parents
445fff03
347b9334
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
rolling_updater_test.go
pkg/kubectl/rolling_updater_test.go
+5
-8
No files found.
pkg/kubectl/rolling_updater_test.go
View file @
efdcd9f8
...
@@ -689,24 +689,22 @@ func TestUpdate_progressTimeout(t *testing.T) {
...
@@ -689,24 +689,22 @@ func TestUpdate_progressTimeout(t *testing.T) {
}
}
}
}
/*
TODO: this was a bad commit @ironcladlou at red hat needs to fix this.
func
TestUpdate_assignOriginalAnnotation
(
t
*
testing
.
T
)
{
func
TestUpdate_assignOriginalAnnotation
(
t
*
testing
.
T
)
{
oldRc
:=
oldRc
(
1
,
1
)
oldRc
:=
oldRc
(
1
,
1
)
delete
(
oldRc
.
Annotations
,
originalReplicasAnnotation
)
delete
(
oldRc
.
Annotations
,
originalReplicasAnnotation
)
newRc
:=
newRc
(
1
,
1
)
newRc
:=
newRc
(
1
,
1
)
var
updatedOldRc
*
api
.
ReplicationController
var
updatedOldRc
*
api
.
ReplicationController
fake
:=
&
testclient
.
Fake
{}
fake
:=
&
testclient
.
Fake
{}
fake.
ReactFn = func(action testclient.Action) (runtime.Object,
error) {
fake
.
AddReactor
(
"*"
,
"*"
,
func
(
action
testclient
.
Action
)
(
handled
bool
,
ret
runtime
.
Object
,
err
error
)
{
switch
a
:=
action
.
(
type
)
{
switch
a
:=
action
.
(
type
)
{
case
testclient
.
GetAction
:
case
testclient
.
GetAction
:
return oldRc, nil
return
true
,
oldRc
,
nil
case
testclient
.
UpdateAction
:
case
testclient
.
UpdateAction
:
updatedOldRc
=
a
.
GetObject
()
.
(
*
api
.
ReplicationController
)
updatedOldRc
=
a
.
GetObject
()
.
(
*
api
.
ReplicationController
)
return updatedOldRc, nil
return
true
,
updatedOldRc
,
nil
}
}
return nil, nil
return
false
,
nil
,
nil
}
}
)
updater
:=
&
RollingUpdater
{
updater
:=
&
RollingUpdater
{
c
:
fake
,
c
:
fake
,
ns
:
"default"
,
ns
:
"default"
,
...
@@ -745,7 +743,6 @@ func TestUpdate_assignOriginalAnnotation(t *testing.T) {
...
@@ -745,7 +743,6 @@ func TestUpdate_assignOriginalAnnotation(t *testing.T) {
t
.
Fatalf
(
"expected annotation value %s, got %s"
,
e
,
a
)
t
.
Fatalf
(
"expected annotation value %s, got %s"
,
e
,
a
)
}
}
}
}
*/
// TestRollingUpdater_cleanupWithClients ensures that the cleanup policy is
// TestRollingUpdater_cleanupWithClients ensures that the cleanup policy is
// correctly implemented.
// correctly implemented.
...
...
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