Skip to content

Commit

Permalink
fix empty dir test for object based remotes
Browse files Browse the repository at this point in the history
  • Loading branch information
yparitcher authored and ncw committed Aug 17, 2019
1 parent 898782a commit 82b3bfe
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion fstest/fstests/fstests.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand Down

0 comments on commit 82b3bfe

Please sign in to comment.