Unverified Commit bc8525df authored by Peter Lee's avatar Peter Lee Committed by GitHub

fix wrong error type when formatting

parent bb3887d7
...@@ -306,7 +306,7 @@ func Test_toRealServer(t *testing.T) { ...@@ -306,7 +306,7 @@ func Test_toRealServer(t *testing.T) {
for i := range Tests { for i := range Tests {
got, err := toRealServer(&Tests[i].ipvsDestination) got, err := toRealServer(&Tests[i].ipvsDestination)
if err != nil { 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) { if !reflect.DeepEqual(*got, Tests[i].realServer) {
t.Errorf("case %d Failed to translate Destination - got %#v, want %#v", i, *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) { ...@@ -349,7 +349,7 @@ func Test_toIPVSDestination(t *testing.T) {
for i := range Tests { for i := range Tests {
got, err := toIPVSDestination(&Tests[i].realServer) got, err := toIPVSDestination(&Tests[i].realServer)
if err != nil { 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) { if !reflect.DeepEqual(*got, Tests[i].ipvsDestination) {
t.Errorf("case %d failed to translate Destination - got %#v, want %#v", i, *got, Tests[i].ipvsDestination) t.Errorf("case %d failed to translate Destination - got %#v, want %#v", i, *got, Tests[i].ipvsDestination)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment