Skip to content

Commit b189f6c

Browse files
test: refactor TableGroup controller tests for consistency and hygiene
Refactors the `TableGroup` controller tests to align with the patterns established in the `MultigresCluster` controller test suite. Changes include: - Splitting `TestTableGroupReconciler_Reconcile` into `_Success` and `_Failure` suites for better organization. - Converting test cases to a map-based structure to enforce unique names and order independence. - Adding `t.Parallel()` to all tests to enable concurrent execution. - Replacing `context.Background()` with `t.Context()` for proper test lifecycle management. - Updating helpers to use the `testing.TB` interface for broader reusability. - Introducing a `preReconcileUpdate` hook and `skipCreate` flag to simplify test fixtures and remove imperative logic from the test table. - Enforcing strict error handling in all setup and validation steps to prevent silent failures.
1 parent a04a7f2 commit b189f6c

File tree

1 file changed

+166
-133
lines changed

1 file changed

+166
-133
lines changed

0 commit comments

Comments
 (0)