From f45e5330ae9af3e99666fc27672e7fb61c443bff Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Tue, 17 Mar 2026 20:01:32 -0700 Subject: [PATCH] Fix TTL test expectation in VolumeNeedleStatus: 7d normalizes to 1w Same normalization as the HTTP test: Go's ReadTTL calls fitTtlCount which converts 7 days to 1 week. --- test/volume_server/grpc/admin_extra_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/volume_server/grpc/admin_extra_test.go b/test/volume_server/grpc/admin_extra_test.go index 9e860bfb3..85afa1ade 100644 --- a/test/volume_server/grpc/admin_extra_test.go +++ b/test/volume_server/grpc/admin_extra_test.go @@ -94,8 +94,9 @@ func TestVolumeNeedleStatusIncludesTtlAndLastModified(t *testing.T) { if err != nil { t.Fatalf("VolumeNeedleStatus with ttl failed: %v", err) } - if statusResp.GetTtl() != "7d" { - t.Fatalf("ttl mismatch: got %q want %q", statusResp.GetTtl(), "7d") + // Go's ReadTTL normalizes via fitTtlCount: 7d → 1w (7 days = 1 week) + if statusResp.GetTtl() != "1w" { + t.Fatalf("ttl mismatch: got %q want %q", statusResp.GetTtl(), "1w") } if statusResp.GetLastModified() != 1700000000 { t.Fatalf("last modified mismatch: got %d want %d", statusResp.GetLastModified(), 1700000000)