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
62399077
Commit
62399077
authored
Mar 18, 2016
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #23145 from liggitt/patch-internal-version
Auto commit by PR queue bot
parents
4c74b990
ea866966
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
resthandler.go
pkg/apiserver/resthandler.go
+2
-2
resthandler_test.go
pkg/apiserver/resthandler_test.go
+1
-1
No files found.
pkg/apiserver/resthandler.go
View file @
62399077
...
@@ -567,11 +567,11 @@ func patchResource(ctx api.Context, admit updateAdmissionFunc, timeout time.Dura
...
@@ -567,11 +567,11 @@ func patchResource(ctx api.Context, admit updateAdmissionFunc, timeout time.Dura
return
nil
,
err
return
nil
,
err
}
}
currentPatch
,
err
:=
strategicpatch
.
CreateStrategicMergePatch
(
originalObjJS
,
currentObjectJS
,
patcher
.
New
()
)
currentPatch
,
err
:=
strategicpatch
.
CreateStrategicMergePatch
(
originalObjJS
,
currentObjectJS
,
versionedObj
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
originalPatch
,
err
:=
strategicpatch
.
CreateStrategicMergePatch
(
originalObjJS
,
originalPatchedObjJS
,
patcher
.
New
()
)
originalPatch
,
err
:=
strategicpatch
.
CreateStrategicMergePatch
(
originalObjJS
,
originalPatchedObjJS
,
versionedObj
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
...
...
pkg/apiserver/resthandler_test.go
View file @
62399077
...
@@ -204,7 +204,7 @@ func (tc *patchTestCase) Run(t *testing.T) {
...
@@ -204,7 +204,7 @@ func (tc *patchTestCase) Run(t *testing.T) {
continue
continue
case
api
.
StrategicMergePatchType
:
case
api
.
StrategicMergePatchType
:
patch
,
err
=
strategicpatch
.
CreateStrategicMergePatch
(
originalObjJS
,
changedJS
,
&
api
.
Pod
{}
)
patch
,
err
=
strategicpatch
.
CreateStrategicMergePatch
(
originalObjJS
,
changedJS
,
versionedObj
)
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Errorf
(
"%s: unexpected error: %v"
,
tc
.
name
,
err
)
t
.
Errorf
(
"%s: unexpected error: %v"
,
tc
.
name
,
err
)
return
return
...
...
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