This reverts commit 468a7f4973 on request to @ChaosInTheCRD
Although passing all our CI checks, @ChaosInTheCRD would like to plan manual testing as part of incorporating these updates.
Updates #cleanup
Change-Id: I3f007b571b884c9538a97ac5d3ded782bcba2347
Signed-off-by: Mike Jensen <mikej@tailscale.com>
This commit is contained in:
@@ -28,7 +28,6 @@ import (
|
||||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"k8s.io/client-go/tools/record"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
@@ -727,11 +726,6 @@ func expectEqual[T any, O ptrObject[T]](t *testing.T, client client.Client, want
|
||||
// so just remove it from both got and want.
|
||||
got.SetResourceVersion("")
|
||||
want.SetResourceVersion("")
|
||||
// Normalize away TypeMeta: recent controller-runtime versions populate
|
||||
// Kind/APIVersion on objects returned from Get, others strip it.
|
||||
// Clearing both sides keeps the comparison stable across versions.
|
||||
got.GetObjectKind().SetGroupVersionKind(schema.GroupVersionKind{})
|
||||
want.GetObjectKind().SetGroupVersionKind(schema.GroupVersionKind{})
|
||||
for _, modifier := range modifiers {
|
||||
modifier(want)
|
||||
modifier(got)
|
||||
|
||||
Reference in New Issue
Block a user