Remove error package and cause functions (#5784)

This commit is contained in:
kannappanr
2018-04-10 09:36:37 -07:00
committed by GitHub
parent 217fb470a7
commit cef992a395
51 changed files with 186 additions and 519 deletions
+1 -4
View File
@@ -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)
}
}