mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-12 23:54:01 +09:00
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:
1 parent
d452b30e42
commit
a56ff5050f
1 file changed
+4
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user