mirror of
https://github.com/rclone/rclone.git
synced 2024-11-07 17:14:44 +01:00
fix empty dir test for object based remotes
This commit is contained in:
parent
898782ac35
commit
82b3bfec3c
@ -494,7 +494,13 @@ func Run(t *testing.T, opt *Opt) {
|
|||||||
TestFsListDirEmpty := func(t *testing.T) {
|
TestFsListDirEmpty := func(t *testing.T) {
|
||||||
skipIfNotOk(t)
|
skipIfNotOk(t)
|
||||||
objs, dirs, err := walk.GetAll(context.Background(), remote, "", true, 1)
|
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{}, objsToNames(objs))
|
||||||
assert.Equal(t, []string{}, dirsToNames(dirs))
|
assert.Equal(t, []string{}, dirsToNames(dirs))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user