I have a kubernetes controller developed using kubebuilder. Now I'm writing tests for my controller. I saw that it uses envtest (
https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/envtest) library for running a k8s server and etcd.
In this setup, I want to test some reconciling logic for non 404 responses from the k8s API server. How do you do this? Is there a way to set this client to return such responses (for that particular test).
Thanks.