Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

vfs: fix rename tests by waiting for writes to complete

Nick Craig-Woodd2ad293fae40
diff --git a/bin/test-repeat-vfs.sh b/bin/test-repeat-vfs.sh
index 396b232c8..c0eee3795 100755
--- a/bin/test-repeat-vfs.sh
+++ b/bin/test-repeat-vfs.sh
@@ -16,10 +16,6 @@ vfs/vfscache/downloaders
cmd/cmount
"
-testdirs="
-cmd/cmount
-"
-
for testdir in ${testdirs}; do
echo "Testing ${testdir}"
cd ${base}/${testdir}
diff --git a/vfs/file_test.go b/vfs/file_test.go
index 59e30a778..0df50bfbd 100644
--- a/vfs/file_test.go
+++ b/vfs/file_test.go
@@ -265,9 +265,12 @@ func testFileRename(t *testing.T, mode vfscommon.CacheMode, inCache bool, forceC
require.NoError(t, err)
require.Equal(t, 14, n)
+ require.NoError(t, file.SetModTime(item.ModTime))
+
err = fd.Close()
require.NoError(t, err)
}
+ vfs.WaitForWriters(waitForWritersDelay)
// check file in cache
if inCache {