Replace uses of ObjectReflectDiff with cmp.Diff

ObjectReflectDiff is already a shim over cmp.Diff, so no actual output
or behavior changes

Kubernetes-commit: bc302fa4144d21a338683cd83701661f97be4aba
This commit is contained in:
Tim Hockin
2023-03-23 11:34:03 -07:00
committed by Kubernetes Publisher
parent c4339eeca9
commit 12553015e2
8 changed files with 20 additions and 22 deletions

View File

@@ -26,11 +26,11 @@ import (
"strings"
"testing"
"github.com/google/go-cmp/cmp"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/util/diff"
"k8s.io/client-go/rest"
)
@@ -89,7 +89,7 @@ func TestClient(t *testing.T) {
},
}
if !reflect.DeepEqual(expect, obj) {
t.Fatal(diff.ObjectReflectDiff(expect, obj))
t.Fatal(cmp.Diff(expect, obj))
}
},
},
@@ -146,7 +146,7 @@ func TestClient(t *testing.T) {
},
}
if !reflect.DeepEqual(expect, objs.Items) {
t.Fatal(diff.ObjectReflectDiff(expect, objs.Items))
t.Fatal(cmp.Diff(expect, objs.Items))
}
},
},