fs/cache: test for fix cached values pointing to files #3424

This commit is contained in:
Nick Craig-Wood 2019-08-09 17:03:57 +01:00
parent 0c1eaf1bcb
commit 7d85ccb11e

View File

@ -62,11 +62,13 @@ func TestGetFile(t *testing.T) {
f, err := GetFn("/file.txt", create)
require.Equal(t, fs.ErrorIsFile, err)
require.NotNil(t, f)
assert.Equal(t, 1, c.Entries())
f2, err := GetFn("/file.txt", create)
require.Equal(t, fs.ErrorIsFile, err)
require.NotNil(t, f2)
assert.Equal(t, f, f2)
}