From 1e56cadeb78c9acdad09159e54dce14aeadc66e9 Mon Sep 17 00:00:00 2001 From: Ajat Prabha Date: Wed, 17 Jul 2019 17:25:34 +0530 Subject: [PATCH] Update deprecated diff.ObjectGoPrintDiff method Use `diff.ObjectGoPrintSideBySide` to print the difference. Kubernetes-commit: 291c145bc567ca8ef82aee14098d0dda7c818300 --- controller_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/controller_test.go b/controller_test.go index 42e5fa03..b24d87ed 100644 --- a/controller_test.go +++ b/controller_test.go @@ -182,7 +182,7 @@ func checkAction(expected, actual core.Action, t *testing.T) { if !reflect.DeepEqual(expObject, object) { t.Errorf("Action %s %s has wrong object\nDiff:\n %s", - a.GetVerb(), a.GetResource().Resource, diff.ObjectGoPrintDiff(expObject, object)) + a.GetVerb(), a.GetResource().Resource, diff.ObjectGoPrintSideBySide(expObject, object)) } case core.UpdateAction: e, _ := expected.(core.UpdateAction) @@ -191,7 +191,7 @@ func checkAction(expected, actual core.Action, t *testing.T) { if !reflect.DeepEqual(expObject, object) { t.Errorf("Action %s %s has wrong object\nDiff:\n %s", - a.GetVerb(), a.GetResource().Resource, diff.ObjectGoPrintDiff(expObject, object)) + a.GetVerb(), a.GetResource().Resource, diff.ObjectGoPrintSideBySide(expObject, object)) } case core.PatchAction: e, _ := expected.(core.PatchAction) @@ -200,7 +200,7 @@ func checkAction(expected, actual core.Action, t *testing.T) { if !reflect.DeepEqual(expPatch, patch) { t.Errorf("Action %s %s has wrong patch\nDiff:\n %s", - a.GetVerb(), a.GetResource().Resource, diff.ObjectGoPrintDiff(expPatch, patch)) + a.GetVerb(), a.GetResource().Resource, diff.ObjectGoPrintSideBySide(expPatch, patch)) } } }