MCPcopy Create free account
hub / github.com/diillson/chatcli / TestMultiSummarizerScoreTargets_WarningViaErrorLogs

Function TestMultiSummarizerScoreTargets_WarningViaErrorLogs

k8s/multi_test.go:615–628  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

613}
614
615func 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
630func TestMultiSummarizerScoreTargets_Critical(t *testing.T) {
631 stores := map[string]*ObservabilityStore{

Callers

nothing calls this directly

Calls 5

scoreTargetsMethod · 0.95
makeHealthyStoreFunction · 0.85
NewMultiSummarizerFunction · 0.85
AddLogsMethod · 0.80
EqualMethod · 0.80

Tested by

no test coverage detected