mirror of
https://github.com/rclone/rclone.git
synced 2024-11-07 17:14:44 +01:00
fstests: attempt to fix TestFsChangeNotify flakiness
This now uses testPut to upload the test files which will retry on errors properly.
This commit is contained in:
parent
762561f88e
commit
9e6ba92a11
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user