Skip to content

Commit bbe8dad

Browse files
test: refactor cluster-handler integration tests and standardize controller setup
Refactors the integration tests for `multigrescluster` and adds new tests for `tablegroup` to match the style and patterns used in the `resource-handler`. Changes: - **Controller Setup:** Updated `MultigresClusterReconciler` and `TableGroupReconciler` to accept variadic `controller.Options` in `SetupWithManager`. This allows injecting `SkipNameValidation: true` for parallel testing, consistent with the Shard controller. - **MultigresCluster Tests:** Rewrote `integration_test.go` to remove `gomega`, leverage the internal `testutil` package, and use table-driven tests. Fixed test fixtures to include required `RootPath` and explicit cell assignments. - **TableGroup Tests:** Added a new `integration_test.go` for TableGroups using the `testutil` pattern. - **Unit Tests:** Updated `_controller_test.go` files to maintain 100% coverage by exercising the new variadic options logic.
1 parent e08df36 commit bbe8dad

File tree

6 files changed

+607
-160
lines changed

6 files changed

+607
-160
lines changed

0 commit comments

Comments
 (0)