mirror of
https://github.com/rclone/rclone.git
synced 2024-11-29 03:48:27 +08: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) {
|
||||
skipIfNotOk(t)
|
||||
objs, dirs, err := walk.GetAll(context.Background(), remote, "", true, 1)
|
||||
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 New Issue
Block a user