Commit c1a562a
test: OCI interface + fake client + reconciler unit tests
- Extract oci.Interface so the reconciler accepts any implementation
- fake.Client records every OCI call, returns configurable results — no
real OCI endpoint needed in CI
- 7 controller tests: finalizer, first assignment, externalIPs patch,
status fields, node failover, deletion cleanup, election balance
- 73% statement coverage on the controller package
- fix: pre-commit golangci hook uses make lint (logcheck needs custom binary)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent d245b36 commit c1a562a
6 files changed
Lines changed: 499 additions & 58 deletions
File tree
- internal
- controller
- oci
- fake
- test/utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
| 40 | + | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
49 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | 90 | | |
96 | 91 | | |
97 | 92 | | |
| |||
120 | 115 | | |
121 | 116 | | |
122 | 117 | | |
123 | | - | |
124 | 118 | | |
125 | 119 | | |
126 | 120 | | |
| |||
0 commit comments