Replace uses of ObjectReflectDiff with cmp.Diff

ObjectReflectDiff is already a shim over cmp.Diff, so no actual output
or behavior changes
This commit is contained in:
Tim Hockin
2023-03-23 11:34:03 -07:00
parent 9627c50ef3
commit bc302fa414
56 changed files with 221 additions and 231 deletions

View File

@@ -26,11 +26,11 @@ import (
"testing"
"time"
"github.com/google/go-cmp/cmp"
v1 "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/apimachinery/pkg/util/intstr"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/client-go/informers"
@@ -1070,7 +1070,7 @@ func TestSyncEndpointsHeadlessService(t *testing.T) {
}},
})
if !reflect.DeepEqual(originalService, service) {
t.Fatalf("syncing endpoints changed service: %s", diff.ObjectReflectDiff(service, originalService))
t.Fatalf("syncing endpoints changed service: %s", cmp.Diff(service, originalService))
}
endpointsHandler.ValidateRequestCount(t, 1)
endpointsHandler.ValidateRequest(t, "/api/v1/namespaces/"+ns+"/endpoints/foo", "PUT", &data)