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
e29c6e1b
Commit
e29c6e1b
authored
Mar 01, 2019
by
Lubomir I. Ivanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go-1.12: fix 'go vet' failures
parent
979bef15
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
test_utils.go
pkg/controller/testutil/test_utils.go
+1
-1
sync_result_test.go
pkg/kubelet/container/sync_result_test.go
+3
-3
kuberuntime_manager_test.go
pkg/kubelet/kuberuntime/kuberuntime_manager_test.go
+1
-1
utils_test.go
pkg/registry/core/service/allocator/utils_test.go
+1
-1
No files found.
pkg/controller/testutil/test_utils.go
View file @
e29c6e1b
...
@@ -374,7 +374,7 @@ func (f *FakeRecorder) PastEventf(obj runtime.Object, timestamp metav1.Time, eve
...
@@ -374,7 +374,7 @@ func (f *FakeRecorder) PastEventf(obj runtime.Object, timestamp metav1.Time, eve
// AnnotatedEventf emits a fake formatted event to the fake recorder
// AnnotatedEventf emits a fake formatted event to the fake recorder
func
(
f
*
FakeRecorder
)
AnnotatedEventf
(
obj
runtime
.
Object
,
annotations
map
[
string
]
string
,
eventtype
,
reason
,
messageFmt
string
,
args
...
interface
{})
{
func
(
f
*
FakeRecorder
)
AnnotatedEventf
(
obj
runtime
.
Object
,
annotations
map
[
string
]
string
,
eventtype
,
reason
,
messageFmt
string
,
args
...
interface
{})
{
f
.
Eventf
(
obj
,
eventtype
,
reason
,
messageFmt
,
args
)
f
.
Eventf
(
obj
,
eventtype
,
reason
,
messageFmt
,
args
...
)
}
}
func
(
f
*
FakeRecorder
)
generateEvent
(
obj
runtime
.
Object
,
timestamp
metav1
.
Time
,
eventtype
,
reason
,
message
string
)
{
func
(
f
*
FakeRecorder
)
generateEvent
(
obj
runtime
.
Object
,
timestamp
metav1
.
Time
,
eventtype
,
reason
,
message
string
)
{
...
...
pkg/kubelet/container/sync_result_test.go
View file @
e29c6e1b
...
@@ -45,7 +45,7 @@ func TestPodSyncResult(t *testing.T) {
...
@@ -45,7 +45,7 @@ func TestPodSyncResult(t *testing.T) {
result
.
AddSyncResult
(
okResults
...
)
result
.
AddSyncResult
(
okResults
...
)
result
.
AddSyncResult
(
errResults
...
)
result
.
AddSyncResult
(
errResults
...
)
if
result
.
Error
()
==
nil
{
if
result
.
Error
()
==
nil
{
t
.
Errorf
(
"PodSyncResult should be error: %
q
"
,
result
)
t
.
Errorf
(
"PodSyncResult should be error: %
v
"
,
result
)
}
}
// If the PodSyncResult is failed, it should be error
// If the PodSyncResult is failed, it should be error
...
@@ -53,7 +53,7 @@ func TestPodSyncResult(t *testing.T) {
...
@@ -53,7 +53,7 @@ func TestPodSyncResult(t *testing.T) {
result
.
AddSyncResult
(
okResults
...
)
result
.
AddSyncResult
(
okResults
...
)
result
.
Fail
(
errors
.
New
(
"error"
))
result
.
Fail
(
errors
.
New
(
"error"
))
if
result
.
Error
()
==
nil
{
if
result
.
Error
()
==
nil
{
t
.
Errorf
(
"PodSyncResult should be error: %
q
"
,
result
)
t
.
Errorf
(
"PodSyncResult should be error: %
v
"
,
result
)
}
}
// If the PodSyncResult is added an error PodSyncResult, it should be error
// If the PodSyncResult is added an error PodSyncResult, it should be error
...
@@ -63,6 +63,6 @@ func TestPodSyncResult(t *testing.T) {
...
@@ -63,6 +63,6 @@ func TestPodSyncResult(t *testing.T) {
result
.
AddSyncResult
(
okResults
...
)
result
.
AddSyncResult
(
okResults
...
)
result
.
AddPodSyncResult
(
errResult
)
result
.
AddPodSyncResult
(
errResult
)
if
result
.
Error
()
==
nil
{
if
result
.
Error
()
==
nil
{
t
.
Errorf
(
"PodSyncResult should be error: %
q
"
,
result
)
t
.
Errorf
(
"PodSyncResult should be error: %
v
"
,
result
)
}
}
}
}
pkg/kubelet/kuberuntime/kuberuntime_manager_test.go
View file @
e29c6e1b
...
@@ -384,7 +384,7 @@ func TestGetPods(t *testing.T) {
...
@@ -384,7 +384,7 @@ func TestGetPods(t *testing.T) {
assert
.
NoError
(
t
,
err
)
assert
.
NoError
(
t
,
err
)
if
!
verifyPods
(
expected
,
actual
)
{
if
!
verifyPods
(
expected
,
actual
)
{
t
.
Errorf
(
"expected %
q, got %q
"
,
expected
,
actual
)
t
.
Errorf
(
"expected %
#v, got %#v
"
,
expected
,
actual
)
}
}
}
}
...
...
pkg/registry/core/service/allocator/utils_test.go
View file @
e29c6e1b
...
@@ -46,7 +46,7 @@ func TestCountBits(t *testing.T) {
...
@@ -46,7 +46,7 @@ func TestCountBits(t *testing.T) {
for
_
,
test
:=
range
tests
{
for
_
,
test
:=
range
tests
{
actual
:=
countBits
(
test
.
n
)
actual
:=
countBits
(
test
.
n
)
if
test
.
expected
!=
actual
{
if
test
.
expected
!=
actual
{
t
.
Errorf
(
"%
d
should have %d bits but recorded as %d"
,
test
.
n
,
test
.
expected
,
actual
)
t
.
Errorf
(
"%
s
should have %d bits but recorded as %d"
,
test
.
n
,
test
.
expected
,
actual
)
}
}
}
}
}
}
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