forked from TrueCloudLab/rclone
fix empty dir test for object based remotes
This commit is contained in:
parent
898782ac35
commit
82b3bfec3c
1 changed files with 7 additions and 1 deletions
|
@ -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))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue