Prune managed resources when sylva-units-status kustomization is ready
This MR is composed of two commits:
-
pruning only when sylva-units-status kustomization is ready
-
a refactoring of unit testing adding flux mock to make tests more efficient (may be moved to another MR)
now to test the pruning of old source, we need:
- sylva-units-status kustomization to be ready
- which is tested only if all managed ressources are ready (repos + helm-release)
This refactoring introduce a mock for flux controller which
- create the repo artifact (setting revision) and set them ready
- set the helmrelease ready
- set the kustomizations ready if the associate source is ready and set LastAppliedRevision to the revision of the source
Related issue: sylva-projects/sylva-core#3310 (closed)
Edited by Arnaud Bouts