mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-13 08:05:19 +09:00
test(observability-proxy): make every bucket-cap case need the rounding
Two of the three windows divided into whole milliseconds, so they passed with the old truncating step and guarded nothing. Each window now leaves a sub-millisecond step remainder. Assisted-by: LLM Signed-off-by: ZverGuy <maximbel2003@gmail.com>
This commit is contained in:
1 parent
ebb5a9cec4
commit
dd96a415a9
1 file changed
+1
-1
@@ -339,7 +339,7 @@ func TestBuildLogsParamsStepCannotWidenWindow(t *testing.T) {
|
||||
func TestBuildLogsParamsStepKeepsBucketCap(t *testing.T) {
|
||||
lim := testLimits()
|
||||
// Spans that MaxBuckets does not divide into whole milliseconds.
|
||||
for _, start := range []string{"2026-11-03T12:00:00.0007Z", "2026-11-04T11:59:58.3333Z", "6d23h59m59s"} {
|
||||
for _, start := range []string{"2026-11-03T12:00:00.0007Z", "2026-11-04T10:00:00.0013Z", "2026-11-04T11:00:00.0005Z"} {
|
||||
out := build(t, "hits", url.Values{"start": {start}})
|
||||
step, err := parseDuration(out.Get("step"))
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user