@@ -191,21 +191,19 @@ var _ = Describe("Eventhandler", func() {
191
191
Describe ("EnqueueRequestsFromMapFunc" , func () {
192
192
It ("should enqueue a Request with the function applied to the CreateEvent." , func () {
193
193
req := []reconcile.Request {}
194
- instance := handler.EnqueueRequestsFromMapFunc {
195
- ToRequests : handler .ToRequestsFunc (func (a handler.MapObject ) []reconcile.Request {
196
- defer GinkgoRecover ()
197
- Expect (a .Object ).To (Equal (pod ))
198
- req = []reconcile.Request {
199
- {
200
- NamespacedName : types.NamespacedName {Namespace : "foo" , Name : "bar" },
201
- },
202
- {
203
- NamespacedName : types.NamespacedName {Namespace : "biz" , Name : "baz" },
204
- },
205
- }
206
- return req
207
- }),
208
- }
194
+ instance := handler .EnqueueRequestsFromMapFunc (func (a handler.MapObject ) []reconcile.Request {
195
+ defer GinkgoRecover ()
196
+ Expect (a .Object ).To (Equal (pod ))
197
+ req = []reconcile.Request {
198
+ {
199
+ NamespacedName : types.NamespacedName {Namespace : "foo" , Name : "bar" },
200
+ },
201
+ {
202
+ NamespacedName : types.NamespacedName {Namespace : "biz" , Name : "baz" },
203
+ },
204
+ }
205
+ return req
206
+ })
209
207
210
208
evt := event.CreateEvent {
211
209
Object : pod ,
@@ -224,21 +222,19 @@ var _ = Describe("Eventhandler", func() {
224
222
225
223
It ("should enqueue a Request with the function applied to the DeleteEvent." , func () {
226
224
req := []reconcile.Request {}
227
- instance := handler.EnqueueRequestsFromMapFunc {
228
- ToRequests : handler .ToRequestsFunc (func (a handler.MapObject ) []reconcile.Request {
229
- defer GinkgoRecover ()
230
- Expect (a .Object ).To (Equal (pod ))
231
- req = []reconcile.Request {
232
- {
233
- NamespacedName : types.NamespacedName {Namespace : "foo" , Name : "bar" },
234
- },
235
- {
236
- NamespacedName : types.NamespacedName {Namespace : "biz" , Name : "baz" },
237
- },
238
- }
239
- return req
240
- }),
241
- }
225
+ instance := handler .EnqueueRequestsFromMapFunc (func (a handler.MapObject ) []reconcile.Request {
226
+ defer GinkgoRecover ()
227
+ Expect (a .Object ).To (Equal (pod ))
228
+ req = []reconcile.Request {
229
+ {
230
+ NamespacedName : types.NamespacedName {Namespace : "foo" , Name : "bar" },
231
+ },
232
+ {
233
+ NamespacedName : types.NamespacedName {Namespace : "biz" , Name : "baz" },
234
+ },
235
+ }
236
+ return req
237
+ })
242
238
243
239
evt := event.DeleteEvent {
244
240
Object : pod ,
@@ -262,20 +258,19 @@ var _ = Describe("Eventhandler", func() {
262
258
newPod .Namespace = pod .Namespace + "2"
263
259
264
260
req := []reconcile.Request {}
265
- instance := handler.EnqueueRequestsFromMapFunc {
266
- ToRequests : handler .ToRequestsFunc (func (a handler.MapObject ) []reconcile.Request {
267
- defer GinkgoRecover ()
268
- req = []reconcile.Request {
269
- {
270
- NamespacedName : types.NamespacedName {Namespace : "foo" , Name : a .Object .GetName () + "-bar" },
271
- },
272
- {
273
- NamespacedName : types.NamespacedName {Namespace : "biz" , Name : a .Object .GetName () + "-baz" },
274
- },
275
- }
276
- return req
277
- }),
278
- }
261
+
262
+ instance := handler .EnqueueRequestsFromMapFunc (func (a handler.MapObject ) []reconcile.Request {
263
+ defer GinkgoRecover ()
264
+ req = []reconcile.Request {
265
+ {
266
+ NamespacedName : types.NamespacedName {Namespace : "foo" , Name : a .Object .GetName () + "-bar" },
267
+ },
268
+ {
269
+ NamespacedName : types.NamespacedName {Namespace : "biz" , Name : a .Object .GetName () + "-baz" },
270
+ },
271
+ }
272
+ return req
273
+ })
279
274
280
275
evt := event.UpdateEvent {
281
276
ObjectOld : pod ,
@@ -303,21 +298,19 @@ var _ = Describe("Eventhandler", func() {
303
298
304
299
It ("should enqueue a Request with the function applied to the GenericEvent." , func () {
305
300
req := []reconcile.Request {}
306
- instance := handler.EnqueueRequestsFromMapFunc {
307
- ToRequests : handler .ToRequestsFunc (func (a handler.MapObject ) []reconcile.Request {
308
- defer GinkgoRecover ()
309
- Expect (a .Object ).To (Equal (pod ))
310
- req = []reconcile.Request {
311
- {
312
- NamespacedName : types.NamespacedName {Namespace : "foo" , Name : "bar" },
313
- },
314
- {
315
- NamespacedName : types.NamespacedName {Namespace : "biz" , Name : "baz" },
316
- },
317
- }
318
- return req
319
- }),
320
- }
301
+ instance := handler .EnqueueRequestsFromMapFunc (func (a handler.MapObject ) []reconcile.Request {
302
+ defer GinkgoRecover ()
303
+ Expect (a .Object ).To (Equal (pod ))
304
+ req = []reconcile.Request {
305
+ {
306
+ NamespacedName : types.NamespacedName {Namespace : "foo" , Name : "bar" },
307
+ },
308
+ {
309
+ NamespacedName : types.NamespacedName {Namespace : "biz" , Name : "baz" },
310
+ },
311
+ }
312
+ return req
313
+ })
321
314
322
315
evt := event.GenericEvent {
323
316
Object : pod ,
0 commit comments