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
99d8868c
Commit
99d8868c
authored
Jul 19, 2016
by
Chao Xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't use string(index)
parent
6d09ba41
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
event_test.go
pkg/client/record/event_test.go
+9
-9
No files found.
pkg/client/record/event_test.go
View file @
99d8868c
...
@@ -20,6 +20,7 @@ import (
...
@@ -20,6 +20,7 @@ import (
"encoding/json"
"encoding/json"
"fmt"
"fmt"
"math/rand"
"math/rand"
"net/http"
"strconv"
"strconv"
"testing"
"testing"
"time"
"time"
...
@@ -32,7 +33,6 @@ import (
...
@@ -32,7 +33,6 @@ import (
k8sruntime
"k8s.io/kubernetes/pkg/runtime"
k8sruntime
"k8s.io/kubernetes/pkg/runtime"
"k8s.io/kubernetes/pkg/util"
"k8s.io/kubernetes/pkg/util"
"k8s.io/kubernetes/pkg/util/strategicpatch"
"k8s.io/kubernetes/pkg/util/strategicpatch"
"net/http"
)
)
type
testEventSink
struct
{
type
testEventSink
struct
{
...
@@ -367,10 +367,10 @@ func TestEventf(t *testing.T) {
...
@@ -367,10 +367,10 @@ func TestEventf(t *testing.T) {
// validate event
// validate event
if
item
.
expectUpdate
{
if
item
.
expectUpdate
{
actualEvent
:=
<-
patchEvent
actualEvent
:=
<-
patchEvent
validateEvent
(
str
ing
(
index
),
actualEvent
,
item
.
expect
,
t
)
validateEvent
(
str
conv
.
Itoa
(
index
),
actualEvent
,
item
.
expect
,
t
)
}
else
{
}
else
{
actualEvent
:=
<-
createEvent
actualEvent
:=
<-
createEvent
validateEvent
(
str
ing
(
index
),
actualEvent
,
item
.
expect
,
t
)
validateEvent
(
str
conv
.
Itoa
(
index
),
actualEvent
,
item
.
expect
,
t
)
}
}
// TODO: uncomment this after we upgrade to Go 1.6.1.
// TODO: uncomment this after we upgrade to Go 1.6.1.
// logWatcher1.Stop()
// logWatcher1.Stop()
...
@@ -618,10 +618,10 @@ func TestEventfNoNamespace(t *testing.T) {
...
@@ -618,10 +618,10 @@ func TestEventfNoNamespace(t *testing.T) {
// validate event
// validate event
if
item
.
expectUpdate
{
if
item
.
expectUpdate
{
actualEvent
:=
<-
patchEvent
actualEvent
:=
<-
patchEvent
validateEvent
(
str
ing
(
index
),
actualEvent
,
item
.
expect
,
t
)
validateEvent
(
str
conv
.
Itoa
(
index
),
actualEvent
,
item
.
expect
,
t
)
}
else
{
}
else
{
actualEvent
:=
<-
createEvent
actualEvent
:=
<-
createEvent
validateEvent
(
str
ing
(
index
),
actualEvent
,
item
.
expect
,
t
)
validateEvent
(
str
conv
.
Itoa
(
index
),
actualEvent
,
item
.
expect
,
t
)
}
}
// TODO: uncomment this after we upgrade to Go 1.6.1.
// TODO: uncomment this after we upgrade to Go 1.6.1.
...
@@ -898,10 +898,10 @@ func TestMultiSinkCache(t *testing.T) {
...
@@ -898,10 +898,10 @@ func TestMultiSinkCache(t *testing.T) {
// validate event
// validate event
if
item
.
expectUpdate
{
if
item
.
expectUpdate
{
actualEvent
:=
<-
patchEvent
actualEvent
:=
<-
patchEvent
validateEvent
(
str
ing
(
index
),
actualEvent
,
item
.
expect
,
t
)
validateEvent
(
str
conv
.
Itoa
(
index
),
actualEvent
,
item
.
expect
,
t
)
}
else
{
}
else
{
actualEvent
:=
<-
createEvent
actualEvent
:=
<-
createEvent
validateEvent
(
str
ing
(
index
),
actualEvent
,
item
.
expect
,
t
)
validateEvent
(
str
conv
.
Itoa
(
index
),
actualEvent
,
item
.
expect
,
t
)
}
}
}
}
...
@@ -914,10 +914,10 @@ func TestMultiSinkCache(t *testing.T) {
...
@@ -914,10 +914,10 @@ func TestMultiSinkCache(t *testing.T) {
// validate event
// validate event
if
item
.
expectUpdate
{
if
item
.
expectUpdate
{
actualEvent
:=
<-
patchEvent2
actualEvent
:=
<-
patchEvent2
validateEvent
(
str
ing
(
index
),
actualEvent
,
item
.
expect
,
t
)
validateEvent
(
str
conv
.
Itoa
(
index
),
actualEvent
,
item
.
expect
,
t
)
}
else
{
}
else
{
actualEvent
:=
<-
createEvent2
actualEvent
:=
<-
createEvent2
validateEvent
(
str
ing
(
index
),
actualEvent
,
item
.
expect
,
t
)
validateEvent
(
str
conv
.
Itoa
(
index
),
actualEvent
,
item
.
expect
,
t
)
}
}
}
}
...
...
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