diff options
Diffstat (limited to 'weed/storage/needle/volume_ttl_test.go')
| -rw-r--r-- | weed/storage/needle/volume_ttl_test.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/weed/storage/needle/volume_ttl_test.go b/weed/storage/needle/volume_ttl_test.go index 0afebebf5..150d06e6e 100644 --- a/weed/storage/needle/volume_ttl_test.go +++ b/weed/storage/needle/volume_ttl_test.go @@ -30,13 +30,18 @@ func TestTTLReadWrite(t *testing.T) { t.Errorf("5d ttl:%v", ttl) } + ttl, _ = ReadTTL("50d") + if ttl.Minutes() != 50*24*60 { + t.Errorf("50d ttl:%v", ttl) + } + ttl, _ = ReadTTL("5w") if ttl.Minutes() != 5*7*24*60 { t.Errorf("5w ttl:%v", ttl) } ttl, _ = ReadTTL("5M") - if ttl.Minutes() != 5*31*24*60 { + if ttl.Minutes() != 5*30*24*60 { t.Errorf("5M ttl:%v", ttl) } |
