cache mutation detector: use correct diff function

The cache mutation detector must use a diff function that is
designed to show differences that cause reflect.DeepEqual to return
false.

Signed-off-by: Monis Khan <mkhan@redhat.com>

Kubernetes-commit: dd4f53cd45499687e768de46a15038d61935ab96
This commit is contained in:
Monis Khan 2019-06-10 15:47:51 -04:00 committed by Kubernetes Publisher
parent 5759fedc8d
commit 55984cdeff

View File

@ -114,7 +114,7 @@ func (d *defaultCacheMutationDetector) CompareObjects() {
altered := false
for i, obj := range d.cachedObjs {
if !reflect.DeepEqual(obj.cached, obj.copied) {
fmt.Printf("CACHE %s[%d] ALTERED!\n%v\n", d.name, i, diff.ObjectDiff(obj.cached, obj.copied))
fmt.Printf("CACHE %s[%d] ALTERED!\n%v\n", d.name, i, diff.ObjectGoPrintSideBySide(obj.cached, obj.copied))
altered = true
}
}