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

Fix TestListDirSorted eventual consistency listing problems

Nick Craig-Wood4d5b73df85e9
diff --git a/fs/operations_test.go b/fs/operations_test.go
index a95e9c424..92bcff10a 100644
--- a/fs/operations_test.go
+++ b/fs/operations_test.go
@@ -916,11 +916,14 @@ func TestListDirSorted(t *testing.T) {
fs.Config.Filter.MaxSize = -1
}()
- r.WriteObject("a.txt", "hello world", t1)
- r.WriteObject("zend.txt", "hello", t1)
- r.WriteObject("sub dir/hello world", "hello world", t1)
- r.WriteObject("sub dir/hello world2", "hello world", t1)
- r.WriteObject("sub dir/sub sub dir/hello world3", "hello world", t1)
+ files := []fstest.Item{
+ r.WriteObject("a.txt", "hello world", t1),
+ r.WriteObject("zend.txt", "hello", t1),
+ r.WriteObject("sub dir/hello world", "hello world", t1),
+ r.WriteObject("sub dir/hello world2", "hello world", t1),
+ r.WriteObject("sub dir/sub sub dir/hello world3", "hello world", t1),
+ }
+ fstest.CheckItems(t, r.fremote, files...)
var items fs.DirEntries
var err error