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
cb24bd03
Unverified
Commit
cb24bd03
authored
Feb 08, 2018
by
Jordan Liggitt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Workaround patch using cached version in TestPatch
parent
b5387eff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
basic_test.go
...io/apiextensions-apiserver/test/integration/basic_test.go
+11
-0
No files found.
staging/src/k8s.io/apiextensions-apiserver/test/integration/basic_test.go
View file @
cb24bd03
...
@@ -578,6 +578,17 @@ func TestPatch(t *testing.T) {
...
@@ -578,6 +578,17 @@ func TestPatch(t *testing.T) {
t
.
Fatalf
(
"unexpected error: %v"
,
err
)
t
.
Fatalf
(
"unexpected error: %v"
,
err
)
}
}
// this call waits for the resourceVersion to be reached in the cache before returning.
// We need to do this because the patch gets its initial object from the storage, and the cache serves that.
// If it is out of date, then our initial patch is applied to an old resource version, which conflicts
// and then the updated object shows a conflicting diff, which permanently fails the patch.
// This gives expected stability in the patch without retrying on an known number of conflicts below in the test.
// See https://issue.k8s.io/42644
_
,
err
=
noxuNamespacedResourceClient
.
Get
(
"foo"
,
metav1
.
GetOptions
{
ResourceVersion
:
createdNoxuInstance
.
GetResourceVersion
()})
if
err
!=
nil
{
t
.
Fatalf
(
"unexpected error: %v"
,
err
)
}
// a patch with no change
// a patch with no change
createdNoxuInstance
,
err
=
noxuNamespacedResourceClient
.
Patch
(
"foo"
,
types
.
MergePatchType
,
patch
)
createdNoxuInstance
,
err
=
noxuNamespacedResourceClient
.
Patch
(
"foo"
,
types
.
MergePatchType
,
patch
)
if
err
!=
nil
{
if
err
!=
nil
{
...
...
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