Harden production workflows and agent admission

This commit is contained in:
Stanislav Rossovskii
2026-05-28 14:19:27 +04:00
parent a2e88b4e76
commit 37b1a1d6d6
109 changed files with 4927 additions and 894 deletions

View File

@@ -55,6 +55,13 @@ func TestDropOldestByCount(t *testing.T) {
if items[0].Event.EventID != "e2" {
t.Fatalf("expected oldest dropped, got %q", items[0].Event.EventID)
}
d := s.Drops()
if d.OverflowEvents != 2 || d.OverflowBytes != 0 {
t.Fatalf("drop stats: %+v", d)
}
if again := s.Drops(); again.OverflowEvents != 0 || again.OverflowBytes != 0 {
t.Fatalf("Drops must reset, got %+v", again)
}
}
func TestDropOldestByBytes(t *testing.T) {
@@ -71,6 +78,10 @@ func TestDropOldestByBytes(t *testing.T) {
if s.Bytes() > 3000 {
t.Fatalf("bytes=%d > 3000", s.Bytes())
}
d := s.Drops()
if d.OverflowBytes == 0 {
t.Fatalf("expected bytes-overflow drops to be counted, got %+v", d)
}
}
func TestReopenAppliesLimits(t *testing.T) {