i dont like commits

This commit is contained in:
Tomas Dvorak
2026-02-24 12:10:13 +01:00
parent 898a3c303f
commit 1d72a1cc01
109 changed files with 43586 additions and 8484 deletions
+19 -2
View File
@@ -30,7 +30,24 @@ func TestScannerRecoversDetectorPanic(t *testing.T) {
if err != nil {
t.Fatalf("scan should recover detector panic, got err: %v", err)
}
if len(result.Findings) != 1 {
t.Fatalf("expected findings from healthy detector only, got %d", len(result.Findings))
if len(result.Findings) != 2 {
t.Fatalf("expected healthy finding plus detector_error, got %d", len(result.Findings))
}
hasOK := false
hasDetectorError := false
for _, f := range result.Findings {
if f.ID == "ok" {
hasOK = true
}
if f.Type == "detector_error" {
hasDetectorError = true
}
}
if !hasOK {
t.Fatalf("expected to keep finding from healthy detector")
}
if !hasDetectorError {
t.Fatalf("expected detector_error finding for panicing detector")
}
}