Commit 0d63ca2
committed
Make downloader.go testable
- Decouple `QuerySource` and `GetRegistryOptions` from the downloader
struct.
- Create the `sourceQuerier` and `registryOptionsGetter` interfaces, so
it would be possible to mock the real implementation in the unit
tests.
- Add the `appRegistrySourceQuerier` struct which implements the `sourceQuerier`
interface with the same functionality that exist before this change.
- Add the `secretRegistryOptionsGetter` struct which implements the `registryOptionsGetter`
interface with the same functionality that exist before this change.
- Add a unit test for downloader.Prepare.
Signed-off-by: gbenhaim <galbh2@gmail.com>1 parent 164d716 commit 0d63ca2
File tree
370 files changed
+24399
-17359
lines changed- pkg/appregistry
- vendor
- github.com
- MakeNowJust/heredoc
- docker/spdystream
- evanphx/json-patch
- json-iterator/go
- golang.org/x/tools
- go
- internal
- gcimporter
- packagesdriver
- packages
- internal
- gopathwalk
- imports
- k8s.io
- apimachinery
- pkg
- apis/meta/v1
- unstructured
- api
- errors
- meta
- resource
- labels
- runtime
- schema
- serializer
- json
- protobuf
- versioning
- util
- intstr
- mergepatch
- naming
- net
- strategicpatch
- validation
- field
- third_party/forked/golang/json
- api
- admissionregistration/v1beta1
- autoscaling
- v1
- v2beta1
- v2beta2
- certificates/v1beta1
- core/v1
- discovery
- v1alpha1
- v1beta1
- extensions/v1beta1
- flowcontrol/v1alpha1
- policy/v1beta1
- rbac
- v1alpha1
- v1beta1
- storage
- v1beta1
- v1
- client-go
- discovery/fake
- kubernetes
- fake
- scheme
- typed
- admissionregistration
- v1beta1/fake
- v1/fake
- apps
- v1beta1/fake
- v1beta2/fake
- v1/fake
- auditregistration/v1alpha1/fake
- authentication
- v1beta1
- fake
- v1
- fake
- authorization
- v1beta1
- fake
- v1
- fake
- autoscaling
- v1/fake
- v2beta1/fake
- v2beta2/fake
- batch
- v1beta1/fake
- v1/fake
- v2alpha1/fake
- certificates/v1beta1/fake
- coordination
- v1beta1/fake
- v1/fake
- core/v1
- fake
- discovery
- v1alpha1/fake
- v1beta1
- events/v1beta1/fake
- extensions/v1beta1/fake
- flowcontrol/v1alpha1
- networking
- v1beta1/fake
- v1/fake
- node
- v1alpha1/fake
- v1beta1/fake
- policy/v1beta1/fake
- rbac
- v1alpha1/fake
- v1beta1/fake
- v1/fake
- scheduling
- v1alpha1/fake
- v1beta1/fake
- v1/fake
- settings/v1alpha1/fake
- storage
- v1alpha1/fake
- v1beta1/fake
- v1
- fake
- pkg
- apis/clientauthentication/v1beta1
- version
- plugin/pkg/client/auth/exec
- rest
- testing
- tools
- clientcmd
- api
- v1
- metrics
- util/cert
- kube-openapi
- pkg/util/proto
- kubectl/pkg/util/templates
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
370 files changed
+24399
-17359
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
126 | 127 | | |
127 | 128 | | |
128 | 129 | | |
| 130 | + | |
129 | 131 | | |
130 | 132 | | |
131 | 133 | | |
| |||
140 | 142 | | |
141 | 143 | | |
142 | 144 | | |
| 145 | + | |
143 | 146 | | |
144 | 147 | | |
145 | 148 | | |
| |||
370 | 373 | | |
371 | 374 | | |
372 | 375 | | |
| 376 | + | |
373 | 377 | | |
374 | 378 | | |
375 | 379 | | |
376 | 380 | | |
377 | 381 | | |
| 382 | + | |
378 | 383 | | |
379 | 384 | | |
380 | 385 | | |
| |||
732 | 737 | | |
733 | 738 | | |
734 | 739 | | |
| 740 | + | |
735 | 741 | | |
| 742 | + | |
736 | 743 | | |
737 | 744 | | |
738 | 745 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 41 | + | |
45 | 42 | | |
46 | 43 | | |
47 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
29 | 46 | | |
30 | | - | |
31 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
32 | 62 | | |
33 | 63 | | |
34 | 64 | | |
| |||
74 | 104 | | |
75 | 105 | | |
76 | 106 | | |
77 | | - | |
| 107 | + | |
78 | 108 | | |
79 | 109 | | |
80 | 110 | | |
| |||
126 | 156 | | |
127 | 157 | | |
128 | 158 | | |
129 | | - | |
| 159 | + | |
130 | 160 | | |
131 | 161 | | |
132 | 162 | | |
| |||
164 | 194 | | |
165 | 195 | | |
166 | 196 | | |
167 | | - | |
| 197 | + | |
168 | 198 | | |
169 | 199 | | |
170 | 200 | | |
171 | 201 | | |
172 | | - | |
| 202 | + | |
173 | 203 | | |
174 | 204 | | |
175 | 205 | | |
| |||
187 | 217 | | |
188 | 218 | | |
189 | 219 | | |
190 | | - | |
| 220 | + | |
191 | 221 | | |
192 | 222 | | |
193 | | - | |
| 223 | + | |
194 | 224 | | |
195 | 225 | | |
196 | 226 | | |
197 | 227 | | |
198 | 228 | | |
199 | 229 | | |
200 | | - | |
| 230 | + | |
201 | 231 | | |
202 | 232 | | |
203 | 233 | | |
| |||
| 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 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments