mirror of
https://github.com/minio/minio.git
synced 2025-11-10 22:10:12 -05:00
XL: Don't return ignored errors in listDirFactory (#3935)
Previously, erasure backend's `listDirFactory` may return errors which were explicitly ignored. With this change, it returns nil. Superfluous checks at higher-layers for ignored errors are removed as well.
This commit is contained in:
committed by
Harshavardhana
parent
1396e91dd1
commit
eb02261642
@@ -348,10 +348,12 @@ func TestListDir(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
// None of the disks are available, should get errDiskNotFound.
|
||||
// None of the disks are available, should get
|
||||
// errDiskNotFound. Since errDiskNotFound is an ignored error,
|
||||
// we should get nil.
|
||||
_, _, err = listDir(volume, "", "")
|
||||
if errorCause(err) != errDiskNotFound {
|
||||
t.Error("expected errDiskNotFound error.")
|
||||
if err != nil {
|
||||
t.Errorf("expected nil error but found %v.", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user