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 <maximbel2003@gmail.com>
This commit is contained in:
ZverGuy committed 2026-11-09 15:48:57 +07:00
1 parent d452b30e42
commit a56ff5050f
1 file changed
+4
+4
View File
@@ -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) {