mirror of https://github.com/k3s-io/k3s
go-1.12: fix 'go vet' failures
parent
979bef156a
commit
e29c6e1b38
|
@ -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
|
||||
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) {
|
||||
|
|
|
@ -45,7 +45,7 @@ func TestPodSyncResult(t *testing.T) {
|
|||
result.AddSyncResult(okResults...)
|
||||
result.AddSyncResult(errResults...)
|
||||
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
|
||||
|
@ -53,7 +53,7 @@ func TestPodSyncResult(t *testing.T) {
|
|||
result.AddSyncResult(okResults...)
|
||||
result.Fail(errors.New("error"))
|
||||
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
|
||||
|
@ -63,6 +63,6 @@ func TestPodSyncResult(t *testing.T) {
|
|||
result.AddSyncResult(okResults...)
|
||||
result.AddPodSyncResult(errResult)
|
||||
if result.Error() == nil {
|
||||
t.Errorf("PodSyncResult should be error: %q", result)
|
||||
t.Errorf("PodSyncResult should be error: %v", result)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -384,7 +384,7 @@ func TestGetPods(t *testing.T) {
|
|||
assert.NoError(t, err)
|
||||
|
||||
if !verifyPods(expected, actual) {
|
||||
t.Errorf("expected %q, got %q", expected, actual)
|
||||
t.Errorf("expected %#v, got %#v", expected, actual)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ func TestCountBits(t *testing.T) {
|
|||
for _, test := range tests {
|
||||
actual := countBits(test.n)
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue