MCPcopy Create free account
hub / github.com/cortexproject/cortex / TestAlertsLimiterWithNoLimits

Function TestAlertsLimiterWithNoLimits

pkg/alertmanager/alertmanager_test.go:219–228  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

217}
218
219func TestAlertsLimiterWithNoLimits(t *testing.T) {
220 ops := []callbackOp{
221 {alert: &types.Alert{Alert: alert1}, existing: false, expectedCount: 1, expectedTotalSize: alert1Size},
222 {alert: &types.Alert{Alert: alert2}, existing: false, expectedCount: 2, expectedTotalSize: alert1Size + alert2Size},
223 {alert: &types.Alert{Alert: alert2}, delete: true, expectedCount: 1, expectedTotalSize: alert1Size},
224 {alert: &types.Alert{Alert: alert1}, delete: true, expectedCount: 0, expectedTotalSize: 0},
225 }
226
227 testLimiter(t, &mockAlertManagerLimits{}, ops)
228}
229
230func TestAlertsLimiterWithCountLimit(t *testing.T) {
231 alert2WithMoreAnnotations := alert2

Callers

nothing calls this directly

Calls 1

testLimiterFunction · 0.85

Tested by

no test coverage detected