From ea5952ace5104afa002f9d3e2d5120b1767646d6 Mon Sep 17 00:00:00 2001 From: Sonu Kumar Singh Date: Tue, 19 Jul 2022 23:19:53 +0530 Subject: [PATCH] Avoid shallow copies of CRDs ref kubernetes-sigs/controller-runtime#1667 --- pkg/testmachinery/controller/ttl/controller_suite_test.go | 2 +- pkg/testmachinery/controller/watch/watch_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/testmachinery/controller/ttl/controller_suite_test.go b/pkg/testmachinery/controller/ttl/controller_suite_test.go index 0c3a2f8425..377c383104 100644 --- a/pkg/testmachinery/controller/ttl/controller_suite_test.go +++ b/pkg/testmachinery/controller/ttl/controller_suite_test.go @@ -69,7 +69,7 @@ var _ = BeforeSuite(func() { Status: &v1.CustomResourceSubresourceStatus{}, } testenv = &envtest.Environment{ - CRDs: []client.Object{crd}, + CRDs: []*v1.CustomResourceDefinition{crd}, } restConfig, err = testenv.Start() diff --git a/pkg/testmachinery/controller/watch/watch_test.go b/pkg/testmachinery/controller/watch/watch_test.go index 30b7503e55..5b891dc5ae 100644 --- a/pkg/testmachinery/controller/watch/watch_test.go +++ b/pkg/testmachinery/controller/watch/watch_test.go @@ -73,7 +73,7 @@ var _ = BeforeSuite(func() { Status: &v1.CustomResourceSubresourceStatus{}, } testenv = &envtest.Environment{ - CRDs: []client.Object{crd}, + CRDs: []*v1.CustomResourceDefinition{crd}, } restConfig, err = testenv.Start()