fix: tests error conditions should be used properly. (#4833)

This commit is contained in:
Harshavardhana
2017-08-23 17:58:52 -07:00
committed by Dee Koder
parent b233345f19
commit db5af1b126
6 changed files with 14 additions and 18 deletions

View File

@@ -229,7 +229,7 @@ func testObjectAPIPutObjectDiskNotFound(obj ObjectLayer, instanceType string, di
sha256sum := ""
for i, testCase := range testCases {
objInfo, actualErr := obj.PutObject(testCase.bucketName, testCase.objName, testCase.intputDataSize, bytes.NewReader(testCase.inputData), testCase.inputMeta, sha256sum)
actualErr = errorCause(err)
actualErr = errorCause(actualErr)
if actualErr != nil && testCase.shouldPass {
t.Errorf("Test %d: %s: Expected to pass, but failed with: <ERROR> %s.", i+1, instanceType, actualErr.Error())
}