Implement testEnv for e2e tests#1697
Conversation
058cf5b to
83fa78b
Compare
|
Would it make sense to always run under testEnv and remove usage of the fake? Generally I saw that it seems to be preferred and better supported over the fake client, but wasn't sure if there were large down sides (e.g. super slow) |
|
I'm supporting all possible modes at the moment because fake is still
useful in many cases, and I still don't want to break flow of unit tests
here and there.
We could gradually remove fake tests over time as we see fit, wdyt?
|
I only added these fake unit tests a few days ago, so, if the env test works just as good happy to switch. I'm happy to try it out and then update and remove, just figured you might have a better idea of it's it's worth it just to switch all at once. |
d10c32d to
c0e4315
Compare
|
@stefanprodan We don't have testEnv v1.21.1. |
|
@chanwit my mistake, the version should be set from https://github.com/kubernetes-sigs/controller-runtime/releases |
|
Looks like we need to add the Kubernetes version to out action, as described here https://github.com/kubernetes-sigs/controller-runtime/tree/master/tools/setup-envtest |
|
@chanwit I figure it out, please set the version to |
5639368 to
edb8ae0
Compare
|
It seems to be working at a certain level. @stefanprodan could you please take a look |
Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
|
I'm updating #1696 now that this is merged and was curious since it was not immediately obvious when reading the test: What are the sleeps for? I was curious if we could explicitly wait for the condition it is expecting, but wasn't sure what the context was. |
|
@allenporter there are many issues with the current install testing, as the namespace finalizer can take anywhere from 1 to 5 minutes :( I will get rid of the sleep. |
This PR implements multiple test modes for e2e.
In addition to fakeKubeManager, we add 2 modes of testEnv:
This PR also implements 2 test cases for
flux installandflux install --component-extrasusing the existing cluster mode.Signed-off-by: Chanwit Kaewkasi chanwit@gmail.com