From 4d5b73df85e97dbf23449a308dadd6d1ec339e6a Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sun, 12 Mar 2017 14:00:22 +0000 Subject: [PATCH] Fix TestListDirSorted eventual consistency listing problems --- fs/operations_test.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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