Skip to content

Commit 3cfaa20

Browse files
Fix TestGroups
Signed-off-by: George Robinson <[email protected]>
1 parent 9d98ff7 commit 3cfaa20

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

dispatch/dispatch_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,7 @@ route:
416416
},
417417
Receiver: "prod",
418418
GroupKey: "{}:{alertname=\"OtherAlert\"}",
419+
RouteID: "{}",
419420
},
420421
&AlertGroup{
421422
Alerts: []*types.Alert{inputAlerts[1]},
@@ -425,6 +426,7 @@ route:
425426
},
426427
Receiver: "testing",
427428
GroupKey: "{}/{env=\"testing\"}:{alertname=\"TestingAlert\", service=\"api\"}",
429+
RouteID: "{}/{env=\"testing\"}/0",
428430
},
429431
&AlertGroup{
430432
Alerts: []*types.Alert{inputAlerts[2], inputAlerts[3]},
@@ -435,6 +437,7 @@ route:
435437
},
436438
Receiver: "prod",
437439
GroupKey: "{}/{env=\"prod\"}:{alertname=\"HighErrorRate\", cluster=\"aa\", service=\"api\"}",
440+
RouteID: "{}/{env=\"prod\"}/1",
438441
},
439442
&AlertGroup{
440443
Alerts: []*types.Alert{inputAlerts[4]},
@@ -445,6 +448,7 @@ route:
445448
},
446449
Receiver: "prod",
447450
GroupKey: "{}/{env=\"prod\"}:{alertname=\"HighErrorRate\", cluster=\"bb\", service=\"api\"}",
451+
RouteID: "{}/{env=\"prod\"}/1",
448452
},
449453
&AlertGroup{
450454
Alerts: []*types.Alert{inputAlerts[5]},
@@ -455,6 +459,7 @@ route:
455459
},
456460
Receiver: "kafka",
457461
GroupKey: "{}/{kafka=\"yes\"}:{alertname=\"HighLatency\", cluster=\"bb\", service=\"db\"}",
462+
RouteID: "{}/{kafka=\"yes\"}/2",
458463
},
459464
&AlertGroup{
460465
Alerts: []*types.Alert{inputAlerts[5]},
@@ -465,6 +470,7 @@ route:
465470
},
466471
Receiver: "prod",
467472
GroupKey: "{}/{env=\"prod\"}:{alertname=\"HighLatency\", cluster=\"bb\", service=\"db\"}",
473+
RouteID: "{}/{env=\"prod\"}/1",
468474
},
469475
}, alertGroups)
470476
require.Equal(t, map[model.Fingerprint][]string{

0 commit comments

Comments
 (0)