Skip to content

Commit c661e22

Browse files
test: introduce preReconcileUpdate hook to simplify test fixtures
Refactors the `MultigresCluster` controller tests to remove anonymous immediate functions (IIFEs) used for initializing struct fields. Instead of defining complex logic inline within the `multigrescluster` field, this change introduces a `preReconcileUpdate` function hook in the test table. This allows the test cases to define a base object cleanly and apply specific mutations (like clearing finalizers or modifying specs) in a dedicated, readable function step before the reconciliation loop runs.
1 parent 508c7ed commit c661e22

File tree

1 file changed

+114
-136
lines changed

1 file changed

+114
-136
lines changed

0 commit comments

Comments
 (0)