perf(replay): threats-only by default, no duplicate first-page or summary fetch
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
19bec553f4
commit
91cdb4acbf
12 files changed
+111
-23
No files matched your search
@@ -0,0 +1,19 @@
|
||||
package store
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestCatSet(t *testing.T) {
|
||||
if catSet("") != nil {
|
||||
t.Fatal("empty list must mean no filter")
|
||||
}
|
||||
if m := catSet("exploit,ban"); len(m) != 2 || !m["exploit"] || !m["ban"] {
|
||||
t.Fatalf("plain list: %v", m)
|
||||
}
|
||||
m := catSet("!ok")
|
||||
if m["ok"] || len(m) != 8 || !m["notfound"] || !m["scanner"] || !m["exploit"] || !m["bruteforce"] || !m["ssh-fail"] || !m["ssh-probe"] || !m["ssh-ok"] || !m["ban"] {
|
||||
t.Fatalf("!ok must keep every other category: %v", m)
|
||||
}
|
||||
if m := catSet("!ok,notfound"); m["ok"] || m["notfound"] || len(m) != 7 {
|
||||
t.Fatalf("!ok,notfound: %v", m)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user