vfs: add --vfs-writeback option to delay writes back to cloud storage
This is enabled by default and can be disabled with --vfs-writeback 0
This commit is contained in:
parent
28255f1bac
commit
e4e53a2e61
19 changed files with 958 additions and 385 deletions
|
@ -12,9 +12,8 @@ import (
|
|||
)
|
||||
|
||||
func TestDirHandleMethods(t *testing.T) {
|
||||
r := fstest.NewRun(t)
|
||||
defer r.Finalise()
|
||||
_, dir, _ := dirCreate(t, r)
|
||||
_, _, dir, _, cleanup := dirCreate(t)
|
||||
defer cleanup()
|
||||
|
||||
h, err := dir.Open(os.O_RDONLY)
|
||||
require.NoError(t, err)
|
||||
|
@ -40,9 +39,8 @@ func TestDirHandleMethods(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestDirHandleReaddir(t *testing.T) {
|
||||
r := fstest.NewRun(t)
|
||||
defer r.Finalise()
|
||||
vfs := New(r.Fremote, nil)
|
||||
r, vfs, cleanup := newTestVFS(t)
|
||||
defer cleanup()
|
||||
|
||||
file1 := r.WriteObject(context.Background(), "dir/file1", "file1 contents", t1)
|
||||
file2 := r.WriteObject(context.Background(), "dir/file2", "file2- contents", t2)
|
||||
|
@ -96,9 +94,8 @@ func TestDirHandleReaddir(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestDirHandleReaddirnames(t *testing.T) {
|
||||
r := fstest.NewRun(t)
|
||||
defer r.Finalise()
|
||||
_, dir, _ := dirCreate(t, r)
|
||||
_, _, dir, _, cleanup := dirCreate(t)
|
||||
defer cleanup()
|
||||
|
||||
fh, err := dir.Open(os.O_RDONLY)
|
||||
require.NoError(t, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue