Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

fstests: check for wrapped errors in ListR test

Nick Craig-Woodfb587371426a
diff --git a/fstest/fstests/fstests.go b/fstest/fstests/fstests.go
index 9b3031acd..11cf4dc8b 100644
--- a/fstest/fstests/fstests.go
+++ b/fstest/fstests/fstests.go
@@ -1558,12 +1558,12 @@ func Run(t *testing.T, opt *Opt) {
}
return nil
})
- if err != errFound && err != errTooMany {
+ if !errors.Is(err, errFound) && !errors.Is(err, errTooMany) {
assert.NoError(t, err)
}
- if err != errTooMany {
- assert.True(t, file1Found, "file1Root not found")
- assert.True(t, file2Found, "file2Root not found")
+ if !errors.Is(err, errTooMany) {
+ assert.True(t, file1Found, "file1Root %q not found", file1Root.Path)
+ assert.True(t, file2Found, "file2Root %q not found", file2Root.Path)
} else {
t.Logf("Too many files to list - giving up")
}