Commit 3b8639a
authored
refactor(controller): add anti-fragile test patterns and clean up utilities (#121)
Refactor controller tests to use `controllers_test` package with shared envtest environment. This consolidates test environment setup in `suite_test.go` using `TestMain` and adds anti-fragile testing patterns including a DistributionBuilder, consolidated test constants, and behavioral helpers. This pull request also documents the intent behind these changes in `CONTRIBUTING.md`.
This is intended to facilitate an upcoming pull request to add a `TestReconcile()` to the controller's test suite to more fully cover the controller's happy path to reconciliation.
Approved-by: VaishnaviHire1 parent 2b48cb8 commit 3b8639a
File tree
4 files changed
+543
-311
lines changed- controllers
4 files changed
+543
-311
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
113 | 149 | | |
114 | 150 | | |
115 | 151 | | |
| |||
0 commit comments