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

fstests: attempt to fix TestFsChangeNotify flakiness

Nick Craig-Wood9e6ba92a110b
diff --git a/fstest/fstests/fstests.go b/fstest/fstests/fstests.go
index 03aee1414..b6ad688b7 100644
--- a/fstest/fstests/fstests.go
+++ b/fstest/fstests/fstests.go
@@ -1021,14 +1021,13 @@ func Run(t *testing.T, opt *Opt) {
dirs = append(dirs, dir)
}
- contents := fstest.RandomString(100)
- buf := bytes.NewBufferString(contents)
-
var objs []fs.Object
for _, idx := range []int{2, 4, 3} {
- obji := object.NewStaticObjectInfo(fmt.Sprintf("dir/file%d", idx), time.Now(), int64(buf.Len()), true, nil, nil)
- o, err := remote.Put(buf, obji)
- require.NoError(t, err)
+ file := fstest.Item{
+ ModTime: time.Now(),
+ Path: fmt.Sprintf("dir/file%d", idx),
+ }
+ _, o := testPut(t, remote, &file)
objs = append(objs, o)
}