@@ -157,12 +157,11 @@ var _ = Describe("Reconciler", func() {
157
157
Expect (WithReconcilePeriod (- time .Nanosecond )(r )).NotTo (Succeed ())
158
158
})
159
159
})
160
- var _ = Describe ("WithInstallAnnotation " , func () {
160
+ var _ = Describe ("WithInstallAnnotations " , func () {
161
161
It ("should set multiple reconciler install annotations" , func () {
162
162
a1 := annotation.InstallDisableHooks {CustomName : "my.domain/custom-name1" }
163
163
a2 := annotation.InstallDisableHooks {CustomName : "my.domain/custom-name2" }
164
- Expect (WithInstallAnnotation (a1 )(r )).To (Succeed ())
165
- Expect (WithInstallAnnotation (a2 )(r )).To (Succeed ())
164
+ Expect (WithInstallAnnotations (a1 , a2 )(r )).To (Succeed ())
166
165
Expect (r .annotations ).To (Equal (map [string ]struct {}{
167
166
"my.domain/custom-name1" : struct {}{},
168
167
"my.domain/custom-name2" : struct {}{},
@@ -175,8 +174,7 @@ var _ = Describe("Reconciler", func() {
175
174
It ("should error with duplicate install annotation" , func () {
176
175
a1 := annotation.InstallDisableHooks {CustomName : "my.domain/custom-name1" }
177
176
a2 := annotation.InstallDisableHooks {CustomName : "my.domain/custom-name1" }
178
- Expect (WithInstallAnnotation (a1 )(r )).To (Succeed ())
179
- Expect (WithInstallAnnotation (a2 )(r )).To (HaveOccurred ())
177
+ Expect (WithInstallAnnotations (a1 , a2 )(r )).NotTo (Succeed ())
180
178
Expect (r .annotations ).To (Equal (map [string ]struct {}{
181
179
"my.domain/custom-name1" : struct {}{},
182
180
}))
@@ -187,8 +185,8 @@ var _ = Describe("Reconciler", func() {
187
185
It ("should error with duplicate upgrade annotation" , func () {
188
186
a1 := annotation.InstallDisableHooks {CustomName : "my.domain/custom-name1" }
189
187
a2 := annotation.UpgradeDisableHooks {CustomName : "my.domain/custom-name1" }
190
- Expect (WithInstallAnnotation (a1 )(r )).To (Succeed ())
191
- Expect (WithUpgradeAnnotation (a2 )(r )).To (HaveOccurred ())
188
+ Expect (WithInstallAnnotations (a1 )(r )).To (Succeed ())
189
+ Expect (WithUpgradeAnnotations (a2 )(r )).To (HaveOccurred ())
192
190
Expect (r .annotations ).To (Equal (map [string ]struct {}{
193
191
"my.domain/custom-name1" : struct {}{},
194
192
}))
@@ -199,8 +197,8 @@ var _ = Describe("Reconciler", func() {
199
197
It ("should error with duplicate uninstall annotation" , func () {
200
198
a1 := annotation.InstallDisableHooks {CustomName : "my.domain/custom-name1" }
201
199
a2 := annotation.UninstallDisableHooks {CustomName : "my.domain/custom-name1" }
202
- Expect (WithInstallAnnotation (a1 )(r )).To (Succeed ())
203
- Expect (WithUninstallAnnotation (a2 )(r )).To (HaveOccurred ())
200
+ Expect (WithInstallAnnotations (a1 )(r )).To (Succeed ())
201
+ Expect (WithUninstallAnnotations (a2 )(r )).To (HaveOccurred ())
204
202
Expect (r .annotations ).To (Equal (map [string ]struct {}{
205
203
"my.domain/custom-name1" : struct {}{},
206
204
}))
@@ -209,12 +207,11 @@ var _ = Describe("Reconciler", func() {
209
207
}))
210
208
})
211
209
})
212
- var _ = Describe ("WithUpgradeAnnotation " , func () {
210
+ var _ = Describe ("WithUpgradeAnnotations " , func () {
213
211
It ("should set multiple reconciler upgrade annotations" , func () {
214
212
a1 := annotation.UpgradeDisableHooks {CustomName : "my.domain/custom-name1" }
215
213
a2 := annotation.UpgradeDisableHooks {CustomName : "my.domain/custom-name2" }
216
- Expect (WithUpgradeAnnotation (a1 )(r )).To (Succeed ())
217
- Expect (WithUpgradeAnnotation (a2 )(r )).To (Succeed ())
214
+ Expect (WithUpgradeAnnotations (a1 , a2 )(r )).To (Succeed ())
218
215
Expect (r .annotations ).To (Equal (map [string ]struct {}{
219
216
"my.domain/custom-name1" : struct {}{},
220
217
"my.domain/custom-name2" : struct {}{},
@@ -227,8 +224,8 @@ var _ = Describe("Reconciler", func() {
227
224
It ("should error with duplicate install annotation" , func () {
228
225
a1 := annotation.UpgradeDisableHooks {CustomName : "my.domain/custom-name1" }
229
226
a2 := annotation.InstallDisableHooks {CustomName : "my.domain/custom-name1" }
230
- Expect (WithUpgradeAnnotation (a1 )(r )).To (Succeed ())
231
- Expect (WithInstallAnnotation (a2 )(r )).To (HaveOccurred ())
227
+ Expect (WithUpgradeAnnotations (a1 )(r )).To (Succeed ())
228
+ Expect (WithInstallAnnotations (a2 )(r )).To (HaveOccurred ())
232
229
Expect (r .annotations ).To (Equal (map [string ]struct {}{
233
230
"my.domain/custom-name1" : struct {}{},
234
231
}))
@@ -239,8 +236,7 @@ var _ = Describe("Reconciler", func() {
239
236
It ("should error with duplicate upgrade annotation" , func () {
240
237
a1 := annotation.UpgradeDisableHooks {CustomName : "my.domain/custom-name1" }
241
238
a2 := annotation.UpgradeDisableHooks {CustomName : "my.domain/custom-name1" }
242
- Expect (WithUpgradeAnnotation (a1 )(r )).To (Succeed ())
243
- Expect (WithUpgradeAnnotation (a2 )(r )).To (HaveOccurred ())
239
+ Expect (WithUpgradeAnnotations (a1 , a2 )(r )).NotTo (Succeed ())
244
240
Expect (r .annotations ).To (Equal (map [string ]struct {}{
245
241
"my.domain/custom-name1" : struct {}{},
246
242
}))
@@ -251,8 +247,8 @@ var _ = Describe("Reconciler", func() {
251
247
It ("should error with duplicate uninstall annotation" , func () {
252
248
a1 := annotation.UpgradeDisableHooks {CustomName : "my.domain/custom-name1" }
253
249
a2 := annotation.UninstallDisableHooks {CustomName : "my.domain/custom-name1" }
254
- Expect (WithUpgradeAnnotation (a1 )(r )).To (Succeed ())
255
- Expect (WithUninstallAnnotation (a2 )(r )).To (HaveOccurred ())
250
+ Expect (WithUpgradeAnnotations (a1 )(r )).To (Succeed ())
251
+ Expect (WithUninstallAnnotations (a2 )(r )).To (HaveOccurred ())
256
252
Expect (r .annotations ).To (Equal (map [string ]struct {}{
257
253
"my.domain/custom-name1" : struct {}{},
258
254
}))
@@ -261,12 +257,11 @@ var _ = Describe("Reconciler", func() {
261
257
}))
262
258
})
263
259
})
264
- var _ = Describe ("WithUninstallAnnotation " , func () {
260
+ var _ = Describe ("WithUninstallAnnotations " , func () {
265
261
It ("should set multiple reconciler uninstall annotations" , func () {
266
262
a1 := annotation.UninstallDisableHooks {CustomName : "my.domain/custom-name1" }
267
263
a2 := annotation.UninstallDisableHooks {CustomName : "my.domain/custom-name2" }
268
- Expect (WithUninstallAnnotation (a1 )(r )).To (Succeed ())
269
- Expect (WithUninstallAnnotation (a2 )(r )).To (Succeed ())
264
+ Expect (WithUninstallAnnotations (a1 , a2 )(r )).To (Succeed ())
270
265
Expect (r .annotations ).To (Equal (map [string ]struct {}{
271
266
"my.domain/custom-name1" : struct {}{},
272
267
"my.domain/custom-name2" : struct {}{},
@@ -279,8 +274,8 @@ var _ = Describe("Reconciler", func() {
279
274
It ("should error with duplicate install annotation" , func () {
280
275
a1 := annotation.UninstallDisableHooks {CustomName : "my.domain/custom-name1" }
281
276
a2 := annotation.InstallDisableHooks {CustomName : "my.domain/custom-name1" }
282
- Expect (WithUninstallAnnotation (a1 )(r )).To (Succeed ())
283
- Expect (WithInstallAnnotation (a2 )(r )).To (HaveOccurred ())
277
+ Expect (WithUninstallAnnotations (a1 )(r )).To (Succeed ())
278
+ Expect (WithInstallAnnotations (a2 )(r )).To (HaveOccurred ())
284
279
Expect (r .annotations ).To (Equal (map [string ]struct {}{
285
280
"my.domain/custom-name1" : struct {}{},
286
281
}))
@@ -291,8 +286,8 @@ var _ = Describe("Reconciler", func() {
291
286
It ("should error with duplicate uninstall annotation" , func () {
292
287
a1 := annotation.UninstallDisableHooks {CustomName : "my.domain/custom-name1" }
293
288
a2 := annotation.UpgradeDisableHooks {CustomName : "my.domain/custom-name1" }
294
- Expect (WithUninstallAnnotation (a1 )(r )).To (Succeed ())
295
- Expect (WithUpgradeAnnotation (a2 )(r )).To (HaveOccurred ())
289
+ Expect (WithUninstallAnnotations (a1 )(r )).To (Succeed ())
290
+ Expect (WithUpgradeAnnotations (a2 )(r )).To (HaveOccurred ())
296
291
Expect (r .annotations ).To (Equal (map [string ]struct {}{
297
292
"my.domain/custom-name1" : struct {}{},
298
293
}))
@@ -303,8 +298,7 @@ var _ = Describe("Reconciler", func() {
303
298
It ("should error with duplicate uninstall annotation" , func () {
304
299
a1 := annotation.UninstallDisableHooks {CustomName : "my.domain/custom-name1" }
305
300
a2 := annotation.UninstallDisableHooks {CustomName : "my.domain/custom-name1" }
306
- Expect (WithUninstallAnnotation (a1 )(r )).To (Succeed ())
307
- Expect (WithUninstallAnnotation (a2 )(r )).To (HaveOccurred ())
301
+ Expect (WithUninstallAnnotations (a1 , a2 )(r )).NotTo (Succeed ())
308
302
Expect (r .annotations ).To (Equal (map [string ]struct {}{
309
303
"my.domain/custom-name1" : struct {}{},
310
304
}))
@@ -378,9 +372,9 @@ var _ = Describe("Reconciler", func() {
378
372
r , err = New (
379
373
WithGroupVersionKind (gvk ),
380
374
WithChart (chrt ),
381
- WithInstallAnnotation (annotation.InstallDescription {}),
382
- WithUpgradeAnnotation (annotation.UpgradeDescription {}),
383
- WithUninstallAnnotation (annotation.UninstallDescription {}),
375
+ WithInstallAnnotations (annotation.InstallDescription {}),
376
+ WithUpgradeAnnotations (annotation.UpgradeDescription {}),
377
+ WithUninstallAnnotations (annotation.UninstallDescription {}),
384
378
WithOverrideValues (map [string ]string {
385
379
"image.repository" : "custom-nginx" ,
386
380
}),
0 commit comments