File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -266,6 +266,11 @@ func TestAlertReconciler_EventHandler(t *testing.T) {
266266 Name : "*" ,
267267 Namespace : "test" ,
268268 },
269+ {
270+ Kind : "Kustomization" ,
271+ Name : "testwildcardnamespace" ,
272+ Namespace : "*" ,
273+ },
269274 },
270275 ExclusionList : []string {
271276 "doesnotoccur" , // not intended to match
@@ -374,6 +379,17 @@ func TestAlertReconciler_EventHandler(t *testing.T) {
374379 },
375380 forwarded : true ,
376381 },
382+ {
383+ name : "forwards events when namespace wildcard is used" ,
384+ modifyEventFunc : func (e eventv1.Event ) eventv1.Event {
385+ e .InvolvedObject .Kind = "Kustomization"
386+ e .InvolvedObject .Name = "testwildcardnamespace"
387+ e .InvolvedObject .Namespace = "test-" + randStringRunes (5 )
388+ e .Message = "test"
389+ return e
390+ },
391+ forwarded : true ,
392+ },
377393 {
378394 name : "forwards events when the label matches" ,
379395 modifyEventFunc : func (e eventv1.Event ) eventv1.Event {
You can’t perform that action at this time.
0 commit comments