Chore: Remove result fields from ngalert (#65410)

* remove result fields from ngalert

* remove duplicate imports
This commit is contained in:
Serge Zaitsev
2023-03-28 10:34:35 +02:00
committed by GitHub
parent 42b58fbca6
commit 0beb768427
34 changed files with 307 additions and 317 deletions
+3 -3
View File
@@ -168,11 +168,11 @@ func CreateTestAlertRuleWithLabels(t testing.TB, ctx context.Context, dbstore *s
NamespaceUIDs: []string{folderUID},
RuleGroup: ruleGroup,
}
err = dbstore.ListAlertRules(ctx, &q)
ruleList, err := dbstore.ListAlertRules(ctx, &q)
require.NoError(t, err)
require.NotEmpty(t, q.Result)
require.NotEmpty(t, ruleList)
rule := q.Result[0]
rule := ruleList[0]
t.Logf("alert definition: %v with title: %q interval: %d folder: %s created", rule.GetKey(), rule.Title, rule.IntervalSeconds, folderUID)
return rule
}