diff options
Diffstat (limited to 'integration_tests')
-rw-r--r-- | integration_tests/main_test.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/integration_tests/main_test.go b/integration_tests/main_test.go index 4b2c11e..e46e2e4 100644 --- a/integration_tests/main_test.go +++ b/integration_tests/main_test.go @@ -60,16 +60,18 @@ func TestMain(m *testing.M) { func testWriteN(t *testing.T, fn string, n int) string { file, err := os.Create(defaultPlainDir + fn) if err != nil { - t.FailNow() + t.Fatal(err) } d := make([]byte, n) written, err := file.Write(d) if err != nil || written != len(d) { - fmt.Printf("err=\"%s\", written=%d\n", err, written) - t.Fail() + t.Errorf("err=\"%s\", written=%d\n", err, written) + } + err = file.Close() + if err != nil { + t.Error(err) } - file.Close() verifySize(t, defaultPlainDir+fn, n) |