From bc8525dfa53e8622ca648962068317200e3bbcd6 Mon Sep 17 00:00:00 2001
From: Peter Lee
Date: Sun, 8 Apr 2018 16:56:06 +0800
Subject: [PATCH] fix wrong error type when formatting
---
pkg/util/ipvs/ipvs_linux_test.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pkg/util/ipvs/ipvs_linux_test.go b/pkg/util/ipvs/ipvs_linux_test.go
index 11f7be67c6..9a6de6c0b5 100644
--- a/pkg/util/ipvs/ipvs_linux_test.go
+++ b/pkg/util/ipvs/ipvs_linux_test.go
@@ -306,7 +306,7 @@ func Test_toRealServer(t *testing.T) {
for i := range Tests {
got, err := toRealServer(&Tests[i].ipvsDestination)
if err != nil {
- t.Errorf("case %d unexpected error: %d", i, err)
+ t.Errorf("case %d unexpected error: %v", i, err)
}
if !reflect.DeepEqual(*got, Tests[i].realServer) {
t.Errorf("case %d Failed to translate Destination - got %#v, want %#v", i, *got, Tests[i].realServer)
@@ -349,7 +349,7 @@ func Test_toIPVSDestination(t *testing.T) {
for i := range Tests {
got, err := toIPVSDestination(&Tests[i].realServer)
if err != nil {
- t.Errorf("case %d unexpected error: %d", i, err)
+ t.Errorf("case %d unexpected error: %v", i, err)
}
if !reflect.DeepEqual(*got, Tests[i].ipvsDestination) {
t.Errorf("case %d failed to translate Destination - got %#v, want %#v", i, *got, Tests[i].ipvsDestination)