Add an assertion on the count of alerts before adding an active alert

Signed-off-by: gotjosh <josue.abreu@gmail.com>
pull/13980/head
gotjosh 7 months ago
parent cc2207148e
commit 151f6e0ed6
No known key found for this signature in database
GPG Key ID: A6E1DDE38FF3C74E

@ -1038,6 +1038,8 @@ func TestAlertingRule_ActiveAlertsCount(t *testing.T) {
labels.EmptyLabels(), labels.EmptyLabels(), "", true, nil, labels.EmptyLabels(), labels.EmptyLabels(), "", true, nil,
) )
require.Equal(t, 0, rule.ActiveAlertsCount())
// Set an active alert. // Set an active alert.
lbls := labels.FromStrings("a1", "1") lbls := labels.FromStrings("a1", "1")
h := lbls.Hash() h := lbls.Hash()

Loading…
Cancel
Save