(t *testing.T)
| 613 | } |
| 614 | |
| 615 | func TestMultiSummarizerScoreTargets_WarningViaErrorLogs(t *testing.T) { |
| 616 | store := makeHealthyStore("myapp", "production") |
| 617 | store.AddLogs([]LogEntry{ |
| 618 | {PodName: "myapp-abc123", Container: "app", Line: "ERROR: something failed", Timestamp: time.Now(), IsError: true}, |
| 619 | }) |
| 620 | stores := map[string]*ObservabilityStore{ |
| 621 | "production/myapp": store, |
| 622 | } |
| 623 | ms := NewMultiSummarizer(stores, 8000) |
| 624 | scores := ms.scoreTargets() |
| 625 | |
| 626 | assert.Equal(t, 1, len(scores)) |
| 627 | assert.Equal(t, 1, scores[0].Score) |
| 628 | } |
| 629 | |
| 630 | func TestMultiSummarizerScoreTargets_Critical(t *testing.T) { |
| 631 | stores := map[string]*ObservabilityStore{ |
nothing calls this directly
no test coverage detected