march: return errors when listing dirs

Partially fixes #3172
This commit is contained in:
Aleksandar Jankovic
2019-07-01 15:32:46 +01:00
committed by Nick Craig-Wood
parent 1be1fc073e
commit cc0800a72e
5 changed files with 60 additions and 12 deletions
+13
View File
@@ -378,6 +378,19 @@ func TestCheck(t *testing.T) {
testCheck(t, operations.Check)
}
func TestCheckFsError(t *testing.T) {
dstFs, err := fs.NewFs("non-existent")
if err != nil {
t.Fatal(err)
}
srcFs, err := fs.NewFs("non-existent")
if err != nil {
t.Fatal(err)
}
err = operations.Check(context.Background(), dstFs, srcFs, false)
require.Error(t, err)
}
func TestCheckDownload(t *testing.T) {
testCheck(t, operations.CheckDownload)
}