test: refactor and addition of CR deletion test#17
test: refactor and addition of CR deletion test#17nbalacha merged 1 commit intoopenshift:mainfrom leelavg:unit-test
Conversation
|
IMHO we are not testing the functionality of the controller. I mean we are just checking that controller runtime client works properly using a CRD. And that is something that has been already verified in the client package. I think that it has more meaning and utility for us the test proposed in #13, where after the creation of the lvmcluster CRD we verified the existence of the CSIDriver resource and topolvm deployment. In any case ... is difficult for me to see this kind of test as "unit test" ,,, is more like a mix between integration test (without CI env) and "extended" unit tests. |
IMHO, if we had flow charts then it suites better to commit failing tests first and then code to fix those tests I'm open to suggestions on how good to refactor tests or what should be tested as part of unit tests and e2e tests. Pls correct me if I presented something not relatable/right 😀 |
- use envtest for verifying reconciliation of lvm cluster CR Signed-off-by: Leela Venkaiah G <lgangava@redhat.com>
jmolmo
left a comment
There was a problem hiding this comment.
I wonder is we can use the structure of this test to do all the "unit test" for all the "functional units".
We need always to create the lvm cluster and start the reconcile loop, after that ,, the verification we need to do for each unit are basically the same ( the unit is created, deployed, and it is composed by several containers) .
|
@jmolmo yes, that's the plan. The current pr creates a basic skeleton and individual component owners add their units with their implementation. |
Signed-off-by: Leela Venkaiah G lgangava@redhat.com