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 @@ -271,6 +271,11 @@ func TestAlertReconciler_EventHandler(t *testing.T) {
271271 Name : "*" ,
272272 Namespace : "test" ,
273273 },
274+ {
275+ Kind : "Kustomization" ,
276+ Name : "testwildcardnamespace" ,
277+ Namespace : "*" ,
278+ },
274279 },
275280 ExclusionList : []string {
276281 "doesnotoccur" , // not intended to match
@@ -379,6 +384,17 @@ func TestAlertReconciler_EventHandler(t *testing.T) {
379384 },
380385 forwarded : true ,
381386 },
387+ {
388+ name : "forwards events when namespace wildcard is used" ,
389+ modifyEventFunc : func (e eventv1.Event ) eventv1.Event {
390+ e .InvolvedObject .Kind = "Kustomization"
391+ e .InvolvedObject .Name = "testwildcardnamespace"
392+ e .InvolvedObject .Namespace = "test-" + randStringRunes (5 )
393+ e .Message = "test"
394+ return e
395+ },
396+ forwarded : true ,
397+ },
382398 {
383399 name : "forwards events when the label matches" ,
384400 modifyEventFunc : func (e eventv1.Event ) eventv1.Event {
You can’t perform that action at this time.
0 commit comments