mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 09:32:29 +08:00
vfs: fix TestVFSStatfs with known total, used and unknown free
This commit is contained in:
parent
31f21551bf
commit
1bd3365868
|
@ -295,7 +295,11 @@ func TestVFSStatfs(t *testing.T) {
|
|||
if vfs.usage.Free != nil {
|
||||
assert.Equal(t, *vfs.usage.Free, free)
|
||||
} else {
|
||||
assert.True(t, free >= int64(unknownFreeBytes))
|
||||
if vfs.usage.Total != nil && vfs.usage.Used != nil {
|
||||
assert.Equal(t, free, total-used)
|
||||
} else {
|
||||
assert.True(t, free >= int64(unknownFreeBytes))
|
||||
}
|
||||
}
|
||||
if vfs.usage.Used != nil {
|
||||
assert.Equal(t, *vfs.usage.Used, used)
|
||||
|
|
Loading…
Reference in New Issue
Block a user