From a56ff5050f913859d2a98cf812fdbfd014b2ff30 Mon Sep 17 00:00:00 2001 From: ZverGuy Date: Wed, 4 Nov 2026 04:58:42 +0700 Subject: [PATCH] test(observability-proxy): accept the smallest satisfiable step cap Startup refuses --logs-max-buckets below 3 and --logs-max-range below 3s, but only the refusals were tested, so moving either bound up by one went unnoticed. Pin the smallest accepted pair. Assisted-by: LLM Signed-off-by: ZverGuy --- cmd/observability-proxy/main_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/observability-proxy/main_test.go b/cmd/observability-proxy/main_test.go index 924c06f28..0a96db4bc 100644 --- a/cmd/observability-proxy/main_test.go +++ b/cmd/observability-proxy/main_test.go @@ -42,6 +42,10 @@ func TestParseFlagsOverrides(t *testing.T) { if o.clusterDomain != "example.org" || o.logs.MaxRange != 24*time.Hour || o.limiter.MaxTails != 3 { t.Errorf("overrides not applied: %+v", o) } + // The smallest bucket count and range the step cap can satisfy. + if _, err := parseFlags([]string{"--logs-max-buckets=3", "--logs-max-range=3s", "--logs-default-range=1s"}); err != nil { + t.Errorf("smallest satisfiable step cap refused: %v", err) + } } func TestParseFlagsInvalid(t *testing.T) {