Merge pull request #116896 from thockin/apimachinery_util_diff_cleanup
apimachinery util/diff cleanups
This commit is contained in:
@@ -23,11 +23,11 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/spf13/pflag"
|
||||
|
||||
eventv1 "k8s.io/api/events/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/util/diff"
|
||||
utilerrors "k8s.io/apimachinery/pkg/util/errors"
|
||||
apiserveroptions "k8s.io/apiserver/pkg/server/options"
|
||||
cpconfig "k8s.io/cloud-provider/config"
|
||||
@@ -442,7 +442,7 @@ func TestAddFlags(t *testing.T) {
|
||||
sort.Sort(sortedGCIgnoredResources(expected.GarbageCollectorController.GCIgnoredResources))
|
||||
|
||||
if !reflect.DeepEqual(expected, s) {
|
||||
t.Errorf("Got different run options than expected.\nDifference detected on:\n%s", diff.ObjectReflectDiff(expected, s))
|
||||
t.Errorf("Got different run options than expected.\nDifference detected on:\n%s", cmp.Diff(expected, s))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -641,7 +641,7 @@ func TestApplyTo(t *testing.T) {
|
||||
s.ApplyTo(c)
|
||||
|
||||
if !reflect.DeepEqual(expected.ComponentConfig, c.ComponentConfig) {
|
||||
t.Errorf("Got different configuration than expected.\nDifference detected on:\n%s", diff.ObjectReflectDiff(expected.ComponentConfig, c.ComponentConfig))
|
||||
t.Errorf("Got different configuration than expected.\nDifference detected on:\n%s", cmp.Diff(expected.ComponentConfig, c.ComponentConfig))
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -21,9 +21,9 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/spf13/pflag"
|
||||
|
||||
"k8s.io/apimachinery/pkg/util/diff"
|
||||
cliflag "k8s.io/component-base/cli/flag"
|
||||
"k8s.io/kubernetes/pkg/kubelet/config"
|
||||
)
|
||||
@@ -101,7 +101,7 @@ func TestRoundTrip(t *testing.T) {
|
||||
continue
|
||||
}
|
||||
if !reflect.DeepEqual(modifiedFlags, outputFlags) {
|
||||
t.Errorf("%s: flags did not round trip: %s", testCase.name, diff.ObjectReflectDiff(modifiedFlags, outputFlags))
|
||||
t.Errorf("%s: flags did not round trip: %s", testCase.name, cmp.Diff(modifiedFlags, outputFlags))
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user