mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Split Scheduler and AlertRouter tests (#52416)
* move fake FakeExternalAlertmanager to sender package * move tests from scheduler to router * update alerts router to have all fields private * update scheduler tests to use sender mock
This commit is contained in:
@@ -185,7 +185,15 @@ func GenerateAlertRules(count int, f func() *AlertRule) []*AlertRule {
|
||||
return result
|
||||
}
|
||||
|
||||
// GenerateGroupKey generates many random alert rules. Does not guarantee that rules are unique (by UID)
|
||||
// GenerateRuleKey generates a random alert rule key
|
||||
func GenerateRuleKey(orgID int64) AlertRuleKey {
|
||||
return AlertRuleKey{
|
||||
OrgID: orgID,
|
||||
UID: util.GenerateShortUID(),
|
||||
}
|
||||
}
|
||||
|
||||
// GenerateGroupKey generates a random group key
|
||||
func GenerateGroupKey(orgID int64) AlertRuleGroupKey {
|
||||
return AlertRuleGroupKey{
|
||||
OrgID: orgID,
|
||||
|
||||
Reference in New Issue
Block a user