Harden production workflows and agent admission
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user