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
7f38898a
Commit
7f38898a
authored
Mar 02, 2018
by
lcfang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix the bad err
parent
f9f5677b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
storage_test.go
...gistry/core/replicationcontroller/storage/storage_test.go
+2
-4
No files found.
pkg/registry/core/replicationcontroller/storage/storage_test.go
View file @
7f38898a
...
@@ -174,8 +174,7 @@ func TestGenerationNumber(t *testing.T) {
...
@@ -174,8 +174,7 @@ func TestGenerationNumber(t *testing.T) {
// Updates to spec should increment the generation number
// Updates to spec should increment the generation number
controller
.
Spec
.
Replicas
+=
1
controller
.
Spec
.
Replicas
+=
1
storage
.
Controller
.
Update
(
ctx
,
controller
.
Name
,
rest
.
DefaultUpdatedObjectInfo
(
controller
),
rest
.
ValidateAllObjectFunc
,
rest
.
ValidateAllObjectUpdateFunc
)
if
_
,
_
,
err
:=
storage
.
Controller
.
Update
(
ctx
,
controller
.
Name
,
rest
.
DefaultUpdatedObjectInfo
(
controller
),
rest
.
ValidateAllObjectFunc
,
rest
.
ValidateAllObjectUpdateFunc
);
err
!=
nil
{
if
err
!=
nil
{
t
.
Errorf
(
"unexpected error: %v"
,
err
)
t
.
Errorf
(
"unexpected error: %v"
,
err
)
}
}
ctrl
,
err
=
storage
.
Controller
.
Get
(
ctx
,
rc
.
Name
,
&
metav1
.
GetOptions
{})
ctrl
,
err
=
storage
.
Controller
.
Get
(
ctx
,
rc
.
Name
,
&
metav1
.
GetOptions
{})
...
@@ -189,8 +188,7 @@ func TestGenerationNumber(t *testing.T) {
...
@@ -189,8 +188,7 @@ func TestGenerationNumber(t *testing.T) {
// Updates to status should not increment either spec or status generation numbers
// Updates to status should not increment either spec or status generation numbers
controller
.
Status
.
Replicas
+=
1
controller
.
Status
.
Replicas
+=
1
storage
.
Controller
.
Update
(
ctx
,
controller
.
Name
,
rest
.
DefaultUpdatedObjectInfo
(
controller
),
rest
.
ValidateAllObjectFunc
,
rest
.
ValidateAllObjectUpdateFunc
)
if
_
,
_
,
err
:=
storage
.
Controller
.
Update
(
ctx
,
controller
.
Name
,
rest
.
DefaultUpdatedObjectInfo
(
controller
),
rest
.
ValidateAllObjectFunc
,
rest
.
ValidateAllObjectUpdateFunc
);
err
!=
nil
{
if
err
!=
nil
{
t
.
Errorf
(
"unexpected error: %v"
,
err
)
t
.
Errorf
(
"unexpected error: %v"
,
err
)
}
}
ctrl
,
err
=
storage
.
Controller
.
Get
(
ctx
,
rc
.
Name
,
&
metav1
.
GetOptions
{})
ctrl
,
err
=
storage
.
Controller
.
Get
(
ctx
,
rc
.
Name
,
&
metav1
.
GetOptions
{})
...
...
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