mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Update rules delete endpoint to handle rules in group (#53790)
* update RouteDeleteAlertRules rules to update as a group * remove expecter from scheduler mock to support variadic function * create function to check for provisioning status + tests Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
This commit is contained in:
@@ -188,6 +188,11 @@ func GenerateUniqueAlertRules(count int, f func() *AlertRule) (map[string]*Alert
|
||||
return uIDs, result
|
||||
}
|
||||
|
||||
// GenerateAlertRulesSmallNonEmpty generates 1 to 5 rules using the provided generator
|
||||
func GenerateAlertRulesSmallNonEmpty(f func() *AlertRule) []*AlertRule {
|
||||
return GenerateAlertRules(rand.Intn(4)+1, f)
|
||||
}
|
||||
|
||||
// GenerateAlertRules generates many random alert rules. Does not guarantee that rules are unique (by UID)
|
||||
func GenerateAlertRules(count int, f func() *AlertRule) []*AlertRule {
|
||||
result := make([]*AlertRule, 0, count)
|
||||
|
||||
Reference in New Issue
Block a user