forked from TrueCloudLab/rclone
fstest: don't error out if the target was not found at end of run
This commit is contained in:
parent
fa4a25a73b
commit
ebd7780188
1 changed files with 6 additions and 2 deletions
|
@ -127,7 +127,7 @@ func NewRun(t *testing.T) *Run {
|
||||||
*r = *oneRun
|
*r = *oneRun
|
||||||
r.cleanRemote = func() {
|
r.cleanRemote = func() {
|
||||||
var toDelete dirsToRemove
|
var toDelete dirsToRemove
|
||||||
require.NoError(t, fs.Walk(r.Fremote, "", true, -1, func(dirPath string, entries fs.DirEntries, err error) error {
|
err := fs.Walk(r.Fremote, "", true, -1, func(dirPath string, entries fs.DirEntries, err error) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if err == fs.ErrorDirNotFound {
|
if err == fs.ErrorDirNotFound {
|
||||||
return nil
|
return nil
|
||||||
|
@ -146,7 +146,11 @@ func NewRun(t *testing.T) *Run {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}))
|
})
|
||||||
|
if err == fs.ErrorDirNotFound {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
require.NoError(t, err)
|
||||||
sort.Sort(toDelete)
|
sort.Sort(toDelete)
|
||||||
for _, dir := range toDelete {
|
for _, dir := range toDelete {
|
||||||
err := r.Fremote.Rmdir(dir)
|
err := r.Fremote.Rmdir(dir)
|
||||||
|
|
Loading…
Reference in a new issue