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
+2 -6
View File
@@ -25,7 +25,6 @@ import (
"testing"
humanize "github.com/dustin/go-humanize"
"github.com/minio/minio/pkg/errors"
)
// Return pointer to testOneByteReadEOF{}
@@ -755,11 +754,8 @@ func testGetDirectoryReturnsObjectNotFound(obj ObjectLayer, instanceType string,
for i, testCase := range testCases {
_, expectedErr := obj.GetObjectInfo(context.Background(), bucketName, testCase.dir)
if expectedErr != nil {
expectedErr = errors.Cause(expectedErr)
if expectedErr.Error() != testCase.err.Error() {
t.Errorf("Test %d, %s: Expected error %s, got %s", i+1, instanceType, testCase.err, expectedErr)
}
if expectedErr != nil && expectedErr.Error() != testCase.err.Error() {
t.Errorf("Test %d, %s: Expected error %s, got %s", i+1, instanceType, testCase.err, expectedErr)
}
}
}