mirror of
https://github.com/pgsty/minio.git
synced 2026-08-08 23:33:30 +03:00
Remove error package and cause functions (#5784)
This commit is contained in:
@@ -22,8 +22,6 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/minio/minio/pkg/errors"
|
||||
)
|
||||
|
||||
// Tests undoes and validates if the undoing completes successfully.
|
||||
@@ -57,7 +55,6 @@ func TestUndoMakeBucket(t *testing.T) {
|
||||
// Validate if bucket was deleted properly.
|
||||
_, err = obj.GetBucketInfo(context.Background(), bucketName)
|
||||
if err != nil {
|
||||
err = errors.Cause(err)
|
||||
switch err.(type) {
|
||||
case BucketNotFound:
|
||||
default:
|
||||
@@ -147,7 +144,7 @@ func TestHealObjectXL(t *testing.T) {
|
||||
// Try healing now, expect to receive errDiskNotFound.
|
||||
_, err = obj.HealObject(context.Background(), bucket, object, false)
|
||||
// since majority of xl.jsons are not available, object quorum can't be read properly and error will be errXLReadQuorum
|
||||
if errors.Cause(err) != errXLReadQuorum {
|
||||
if err != errXLReadQuorum {
|
||||
t.Errorf("Expected %v but received %v", errDiskNotFound, err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user