Alerting: Update GetRuleGroupAlertRules to accept optional rule group (#46889)

* rename GetRuleGroupAlertRules to GetAlertRules
* make rule group optional in GetAlertRulesQuery
* simplify FakeStore. the current structure did not support optional rule group
This commit is contained in:
Yuriy Tseretyan
2022-03-23 17:36:25 +00:00
committed by GitHub
parent 562a25ad99
commit 4ee48c2e77
7 changed files with 73 additions and 130 deletions
+1 -1
View File
@@ -221,7 +221,7 @@ func TestCalculateChanges(t *testing.T) {
expectedErr := errors.New("TEST ERROR")
fakeStore.Hook = func(cmd interface{}) error {
switch cmd.(type) {
case models.ListRuleGroupAlertRulesQuery:
case models.GetAlertRulesQuery:
return expectedErr
}
return nil