Commit 8658528
committed
test: enforce strict error handling in MultigresCluster controller tests
Updates `TestMultigresClusterReconciler_Reconcile` to check all errors returned during test setup and validation phases.
Previously, errors from client operations (e.g., `c.Create`, `c.Get`) or setup functions were sometimes ignored. This change ensures that any failure in test prerequisites or validation immediately fails the test using `t.Fatal` or `t.Fatalf`. This prevents silent failures where a test might technically "pass" despite the setup failing, and provides immediate, clear feedback when the test environment is not in the expected state.1 parent 60b96bb commit 8658528
File tree
1 file changed
+15
-5
lines changed- pkg/cluster-handler/controller/multigrescluster
1 file changed
+15
-5
lines changedLines changed: 15 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
148 | 150 | | |
149 | 151 | | |
150 | 152 | | |
| |||
512 | 514 | | |
513 | 515 | | |
514 | 516 | | |
515 | | - | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
516 | 520 | | |
517 | | - | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
518 | 524 | | |
519 | 525 | | |
520 | 526 | | |
521 | 527 | | |
522 | | - | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
523 | 531 | | |
524 | 532 | | |
525 | 533 | | |
| |||
1028 | 1036 | | |
1029 | 1037 | | |
1030 | 1038 | | |
1031 | | - | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
1032 | 1042 | | |
1033 | 1043 | | |
1034 | 1044 | | |
| |||
0 commit comments