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()