Commit 168960c
authored
✨ Add envtest setup and controller tests (#10)
Adding the envtest setup, that can be triggered by a Make target and
allows unit tests for the controllers.
Adding a test provider objects
TestInfrastructureProviderClusterStackReleaseTemplate to make unit tests
indepedent of any specific provider.
Adding mocking setup to generate mocks for the interfaces which can be
used in unit testing. Adding mocks for Github client and for the kube
client.
Adding utils package for testing that contains utility functions to work
with conditions and checks whether certain objects have a specific
condition and how its properties look like.
Adding local cluster stacks that have been downloaded from Github
SovereignCloudStack/cluster-stacks repository to make unit tests
independent of another repository and make it possible to run them
locally.
Adding unit tests to CI.
Signed-off-by: janiskemper <[email protected]>1 parent 4431f3e commit 168960c
File tree
305 files changed
+71111
-14
lines changed- .github/workflows
- internal
- controller
- test/helpers
- builder
- pkg
- github/client/mocks
- kube/mocks
- test/utils
- test/releases/cluster-stacks
- docker-ferrol-1-27-v1
- docker-ferrol-1-27-v2
- vendor
- github.com
- go-logr/logr/funcr
- go-task/slim-sprig
- google/pprof
- profile
- onsi/ginkgo/v2
- config
- formatter
- ginkgo
- build
- command
- generators
- internal
- labels
- outline
- run
- unfocus
- watch
- internal
- global
- interrupt_handler
- parallel_support
- testingtproxy
- reporters
- types
- pmezard/go-difflib
- difflib
- stretchr
- objx
- testify
- assert
- mock
- golang.org/x
- mod
- internal/lazyregexp
- modfile
- module
- semver
- tools
- go/ast/inspector
- internal/typeparams
- k8s.io
- apiextensions-apiserver/pkg
- apis/apiextensions/v1beta1
- client/clientset/clientset
- scheme
- typed/apiextensions
- v1beta1
- v1
- client-go/util/retry
- cluster-bootstrap
- token
- api
- util
- klog/v2/klogr
- sigs.k8s.io
- cluster-api
- api/v1beta1
- bootstrap/kubeadm/api/v1beta1
- cmd/clusterctl/log
- test
- infrastructure/docker/api/v1beta1
- util
- certs
- kubeconfig
- secret
- topology
- controller-runtime/pkg
- envtest
- internal
- flock
- testing
- addr
- certs
- controlplane
- process
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
305 files changed
+71111
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
270 | 273 | | |
271 | 274 | | |
272 | 275 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
142 | 184 | | |
143 | 185 | | |
144 | 186 | | |
| |||
277 | 319 | | |
278 | 320 | | |
279 | 321 | | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
280 | 327 | | |
281 | 328 | | |
282 | 329 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
8 | 12 | | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
13 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
14 | 20 | | |
15 | 21 | | |
16 | 22 | | |
17 | 23 | | |
18 | | - | |
| 24 | + | |
| 25 | + | |
19 | 26 | | |
| 27 | + | |
20 | 28 | | |
21 | | - | |
22 | | - | |
| 29 | + | |
23 | 30 | | |
24 | 31 | | |
25 | 32 | | |
| |||
39 | 46 | | |
40 | 47 | | |
41 | 48 | | |
42 | | - | |
| 49 | + | |
43 | 50 | | |
44 | 51 | | |
45 | 52 | | |
| |||
82 | 89 | | |
83 | 90 | | |
84 | 91 | | |
85 | | - | |
| 92 | + | |
86 | 93 | | |
87 | 94 | | |
88 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| |||
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
| 121 | + | |
120 | 122 | | |
121 | 123 | | |
122 | 124 | | |
123 | 125 | | |
124 | 126 | | |
125 | 127 | | |
126 | 128 | | |
| 129 | + | |
127 | 130 | | |
128 | 131 | | |
129 | 132 | | |
| |||
158 | 161 | | |
159 | 162 | | |
160 | 163 | | |
| 164 | + | |
161 | 165 | | |
162 | 166 | | |
163 | 167 | | |
| |||
193 | 197 | | |
194 | 198 | | |
195 | 199 | | |
| 200 | + | |
196 | 201 | | |
197 | 202 | | |
198 | 203 | | |
| |||
235 | 240 | | |
236 | 241 | | |
237 | 242 | | |
| 243 | + | |
| 244 | + | |
238 | 245 | | |
239 | 246 | | |
240 | 247 | | |
| |||
266 | 273 | | |
267 | 274 | | |
268 | 275 | | |
| 276 | + | |
269 | 277 | | |
270 | 278 | | |
271 | 279 | | |
| |||
370 | 378 | | |
371 | 379 | | |
372 | 380 | | |
| 381 | + | |
373 | 382 | | |
374 | 383 | | |
375 | 384 | | |
| |||
378 | 387 | | |
379 | 388 | | |
380 | 389 | | |
381 | | - | |
382 | | - | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
383 | 394 | | |
384 | 395 | | |
385 | 396 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| |||
580 | 580 | | |
581 | 581 | | |
582 | 582 | | |
583 | | - | |
| 583 | + | |
584 | 584 | | |
585 | 585 | | |
586 | 586 | | |
| |||
0 commit comments