mirror of
https://github.com/minio/minio.git
synced 2025-11-09 21:49:46 -05:00
storage: DeleteFile should return errFileNotFound for ENOENT. (#2978)
This commit is contained in:
@@ -678,8 +678,8 @@ func TestPosixListDir(t *testing.T) {
|
||||
t.Errorf("Unable to initialize posix, %s", err)
|
||||
}
|
||||
|
||||
if err = posixStorage.DeleteFile("bin", "yes"); !os.IsPermission(err) {
|
||||
t.Errorf("expected: Permission error, got: %s", err)
|
||||
if err = posixStorage.DeleteFile("bin", "yes"); err != errFileAccessDenied {
|
||||
t.Errorf("expected: %s, got: %s", errFileAccessDenied, err)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -792,8 +792,8 @@ func TestDeleteFile(t *testing.T) {
|
||||
t.Errorf("Unable to initialize posix, %s", err)
|
||||
}
|
||||
|
||||
if err = posixStorage.DeleteFile("bin", "yes"); !os.IsPermission(err) {
|
||||
t.Errorf("expected: Permission error, got: %s", err)
|
||||
if err = posixStorage.DeleteFile("bin", "yes"); err != errFileAccessDenied {
|
||||
t.Errorf("expected: %s, got: %s", errFileAccessDenied, err)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user