(t *testing.T, mode vfscommon.CacheMode)
| 19 | ) |
| 20 | |
| 21 | func fileCreate(t *testing.T, mode vfscommon.CacheMode) (r *fstest.Run, vfs *VFS, fh *File, item fstest.Item) { |
| 22 | opt := vfscommon.Opt |
| 23 | opt.CacheMode = mode |
| 24 | opt.WriteBack = writeBackDelay |
| 25 | r, vfs = newTestVFSOpt(t, &opt) |
| 26 | |
| 27 | file1 := r.WriteObject(context.Background(), "dir/file1", "file1 contents", t1) |
| 28 | r.CheckRemoteItems(t, file1) |
| 29 | |
| 30 | node, err := vfs.Stat("dir/file1") |
| 31 | require.NoError(t, err) |
| 32 | require.True(t, node.Mode().IsRegular()) |
| 33 | |
| 34 | return r, vfs, node.(*File), file1 |
| 35 | } |
| 36 | |
| 37 | func TestFileMethods(t *testing.T) { |
| 38 | r, vfs, file, _ := fileCreate(t, vfscommon.CacheModeOff) |
no test coverage detected
searching dependent graphs…