Browse Source

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.
rust-volume-server
Chris Lu 2 days ago
parent
commit
f45e5330ae
  1. 5
      test/volume_server/grpc/admin_extra_test.go

5
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)

Loading…
Cancel
Save