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
078f2d6b
Commit
078f2d6b
authored
Sep 26, 2016
by
Hongchao Deng
Committed by
GitHub
Sep 26, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Work around the etcd watch issue"
parent
7309d348
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
7 deletions
+1
-7
resttest.go
pkg/api/rest/resttest/resttest.go
+1
-7
No files found.
pkg/api/rest/resttest/resttest.go
View file @
078f2d6b
...
...
@@ -34,8 +34,6 @@ import (
"k8s.io/kubernetes/pkg/runtime"
"k8s.io/kubernetes/pkg/types"
"k8s.io/kubernetes/pkg/util/wait"
"golang.org/x/net/context"
)
type
Tester
struct
{
...
...
@@ -1235,7 +1233,6 @@ func (t *Tester) testWatchFields(obj runtime.Object, emitFn EmitFunc, fieldsPass
for
_
,
field
:=
range
fieldsPass
{
for
_
,
action
:=
range
actions
{
options
:=
&
api
.
ListOptions
{
FieldSelector
:
field
.
AsSelector
(),
ResourceVersion
:
"1"
}
ctx
=
context
.
WithValue
(
context
.
WithValue
(
ctx
,
"field"
,
field
),
"action"
,
action
)
watcher
,
err
:=
t
.
storage
.
(
rest
.
Watcher
)
.
Watch
(
ctx
,
options
)
if
err
!=
nil
{
t
.
Errorf
(
"unexpected error: %v, %v"
,
err
,
action
)
...
...
@@ -1260,7 +1257,6 @@ func (t *Tester) testWatchFields(obj runtime.Object, emitFn EmitFunc, fieldsPass
for
_
,
field
:=
range
fieldsFail
{
for
_
,
action
:=
range
actions
{
options
:=
&
api
.
ListOptions
{
FieldSelector
:
field
.
AsSelector
(),
ResourceVersion
:
"1"
}
ctx
=
context
.
WithValue
(
context
.
WithValue
(
ctx
,
"field"
,
field
),
"action"
,
action
)
watcher
,
err
:=
t
.
storage
.
(
rest
.
Watcher
)
.
Watch
(
ctx
,
options
)
if
err
!=
nil
{
t
.
Errorf
(
"unexpected error: %v"
,
err
)
...
...
@@ -1281,12 +1277,11 @@ func (t *Tester) testWatchFields(obj runtime.Object, emitFn EmitFunc, fieldsPass
}
func
(
t
*
Tester
)
testWatchLabels
(
obj
runtime
.
Object
,
emitFn
EmitFunc
,
labelsPass
,
labelsFail
[]
labels
.
Set
,
actions
[]
string
)
{
ctx
:=
t
.
TestContext
()
.
(
context
.
Context
)
ctx
:=
t
.
TestContext
()
for
_
,
label
:=
range
labelsPass
{
for
_
,
action
:=
range
actions
{
options
:=
&
api
.
ListOptions
{
LabelSelector
:
label
.
AsSelector
(),
ResourceVersion
:
"1"
}
ctx
=
context
.
WithValue
(
context
.
WithValue
(
ctx
,
"label"
,
label
),
"action"
,
action
)
watcher
,
err
:=
t
.
storage
.
(
rest
.
Watcher
)
.
Watch
(
ctx
,
options
)
if
err
!=
nil
{
t
.
Errorf
(
"unexpected error: %v"
,
err
)
...
...
@@ -1310,7 +1305,6 @@ func (t *Tester) testWatchLabels(obj runtime.Object, emitFn EmitFunc, labelsPass
for
_
,
label
:=
range
labelsFail
{
for
_
,
action
:=
range
actions
{
options
:=
&
api
.
ListOptions
{
LabelSelector
:
label
.
AsSelector
(),
ResourceVersion
:
"1"
}
ctx
=
context
.
WithValue
(
context
.
WithValue
(
ctx
,
"label"
,
label
),
"action"
,
action
)
watcher
,
err
:=
t
.
storage
.
(
rest
.
Watcher
)
.
Watch
(
ctx
,
options
)
if
err
!=
nil
{
t
.
Errorf
(
"unexpected error: %v"
,
err
)
...
...
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