diff --git a/hypershift-operator/controllers/nodepool/nodepool_controller_test.go b/hypershift-operator/controllers/nodepool/nodepool_controller_test.go index b16323ab6ef2..544753f03512 100644 --- a/hypershift-operator/controllers/nodepool/nodepool_controller_test.go +++ b/hypershift-operator/controllers/nodepool/nodepool_controller_test.go @@ -3864,7 +3864,11 @@ func TestEnqueueNodePoolsForCloudConfig(t *testing.T) { t.Parallel() g := NewWithT(t) - c := fake.NewClientBuilder().WithScheme(api.Scheme).WithObjects(tc.objects...).Build() + objs := make([]client.Object, len(tc.objects)) + for i, o := range tc.objects { + objs[i] = o.DeepCopyObject().(client.Object) + } + c := fake.NewClientBuilder().WithScheme(api.Scheme).WithObjects(objs...).Build() r := &NodePoolReconciler{Client: c} result := r.enqueueNodePoolsForCloudConfig(context.Background(), tc.cm)