mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-17 15:47:48 +00:00
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:
committed by
Kubernetes Publisher
parent
c4339eeca9
commit
12553015e2
@@ -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))
|
||||
}
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user