From 82b3bfec3caca7636ce6edf87ee82820bda843a5 Mon Sep 17 00:00:00 2001 From: yparitcher Date: Tue, 13 Aug 2019 16:25:11 -0400 Subject: [PATCH] fix empty dir test for object based remotes --- fstest/fstests/fstests.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fstest/fstests/fstests.go b/fstest/fstests/fstests.go index 50a9df91b..3e5e48a55 100644 --- a/fstest/fstests/fstests.go +++ b/fstest/fstests/fstests.go @@ -494,7 +494,13 @@ func Run(t *testing.T, opt *Opt) { TestFsListDirEmpty := func(t *testing.T) { skipIfNotOk(t) objs, dirs, err := walk.GetAll(context.Background(), remote, "", true, 1) - require.NoError(t, err) + if !remote.Features().CanHaveEmptyDirectories { + if err != fs.ErrorDirNotFound { + require.NoError(t, err) + } + } else { + require.NoError(t, err) + } assert.Equal(t, []string{}, objsToNames(objs)) assert.Equal(t, []string{}, dirsToNames(dirs)) }