Several questions about e2e test. #2259
-
I am fresh. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @littletiger123, Minikuke is just a vendor for you to have the Kubernetes cluster installed. ENV TEST: If a lib to help you out create tests which will be integrated because the requests are actually done against the cluster. However, its purpose is more like "unit" test of the controller's implementation. Therefore, I'd recommend checking out the files scaffolded by the new plugin deploy.image/v1-alpha, see: https://github.com/kubernetes-sigs/kubebuilder/blob/master/testdata/project-v3-with-deploy-image/controllers/busybox_controller_test.go#L36-L125 as an example. Also, if you are looking for e2e tests for your whole project you might want to look at the example implemented on the SDK repo, see: https://github.com/operator-framework/operator-sdk/tree/master/testdata/go/v3/memcached-operator/test/e2e. Marking it as answered but feel free to create new discussion topics or issues if you need |
Beta Was this translation helpful? Give feedback.
-
Closing since it is answered. |
Beta Was this translation helpful? Give feedback.
Hi @littletiger123,
Minikuke is just a vendor for you to have the Kubernetes cluster installed.
ENV TEST: If a lib to help you out create tests which will be integrated because the requests are actually done against the cluster. However, its purpose is more like "unit" test of the controller's implementation.
Therefore, I'd recommend checking out the files scaffolded by the new plugin deploy.image/v1-alpha, see: https://github.com/kubernetes-sigs/kubebuilder/blob/master/testdata/project-v3-with-deploy-image/controllers/busybox_controller_test.go#L36-L125 as an example.
Also, if you are looking for e2e tests for your whole project you might want to look at the example implemented on the SD…