mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
Replace uses of diff.ObjectDiff with cmp.Diff
ObjectDiff is already a shim over cmp.Diff, so no actual output or behavior changes
This commit is contained in:
@@ -21,9 +21,9 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/fields"
|
||||
"k8s.io/apimachinery/pkg/util/diff"
|
||||
apitesting "k8s.io/kubernetes/pkg/api/testing"
|
||||
api "k8s.io/kubernetes/pkg/apis/core"
|
||||
|
||||
@@ -67,7 +67,7 @@ func TestGetAttrs(t *testing.T) {
|
||||
"type": api.EventTypeNormal,
|
||||
}
|
||||
if e, a := expectA, field; !reflect.DeepEqual(e, a) {
|
||||
t.Errorf("diff: %s", diff.ObjectDiff(e, a))
|
||||
t.Errorf("diff: %s", cmp.Diff(e, a))
|
||||
}
|
||||
|
||||
eventB := &api.Event{
|
||||
@@ -105,7 +105,7 @@ func TestGetAttrs(t *testing.T) {
|
||||
"type": api.EventTypeNormal,
|
||||
}
|
||||
if e, a := expectB, field; !reflect.DeepEqual(e, a) {
|
||||
t.Errorf("diff: %s", diff.ObjectDiff(e, a))
|
||||
t.Errorf("diff: %s", cmp.Diff(e, a))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user