Alerting: Refactor Alert Rule Generators (#86813)

This commit is contained in:
Yuri Tseretyan
2024-04-29 21:52:15 -04:00
committed by GitHub
parent 8bb9b06e48
commit 052082a927
27 changed files with 739 additions and 648 deletions
@@ -189,7 +189,8 @@ func TestEvaluatorTest(t *testing.T) {
return manager
},
}
rule := models.AlertRuleGen(models.WithInterval(time.Second))()
gen := models.RuleGen
rule := gen.With(gen.WithInterval(time.Second)).GenerateRef()
ruleInterval := time.Duration(rule.IntervalSeconds) * time.Second
t.Run("should return data frame in specific format", func(t *testing.T) {