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
-4
View File
@@ -82,10 +82,6 @@ func TestErasureCreateFile(t *testing.T) {
setup.Remove()
t.Fatalf("Test %d: failed to generate random test data: %v", i, err)
}
algorithm := test.algorithm
if !algorithm.Available() {
algorithm = DefaultBitrotAlgorithm
}
file, err := storage.CreateFile(bytes.NewReader(data[test.offset:]), "testbucket", "object", buffer, test.algorithm, test.dataBlocks+1)
if err != nil && !test.shouldFail {
t.Errorf("Test %d: should pass but failed with: %v", i, err)