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: fix test crash if NewFs fails

Nick Craig-Woodf1ffe8e3096f
diff --git a/fstest/fstests/fstests.go b/fstest/fstests/fstests.go
index 961f861dd..d6ab1bf62 100644
--- a/fstest/fstests/fstests.go
+++ b/fstest/fstests/fstests.go
@@ -976,6 +976,7 @@ func Run(t *testing.T, opt *Opt) {
file2Copy.Path = "z.txt"
file2Copy.WinPath = ""
fileRemote, err := fs.NewFs(remoteName)
+ require.NotNil(t, fileRemote)
assert.Equal(t, fs.ErrorIsFile, err)
fstest.CheckListing(t, fileRemote, []fstest.Item{file2Copy})
})