(t *testing.T)
| 217 | } |
| 218 | |
| 219 | func 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 | |
| 230 | func TestAlertsLimiterWithCountLimit(t *testing.T) { |
| 231 | alert2WithMoreAnnotations := alert2 |
nothing calls this directly
no test coverage detected