chunker: fix integration tests and hashsum issues

This commit is contained in:
Ivan Andreev 2019-10-10 00:33:05 +03:00 committed by Nick Craig-Wood
parent 910c80bd02
commit 77b42aa33a
3 changed files with 83 additions and 35 deletions

View file

@ -418,6 +418,7 @@ func testPreventCorruption(t *testing.T, f *Fs) {
var chunkContents []byte
assert.NotPanics(t, func() {
chunkContents, err = ioutil.ReadAll(r)
_ = r.Close()
})
assert.NoError(t, err)
assert.NotEqual(t, contents, string(chunkContents))
@ -451,6 +452,7 @@ func testPreventCorruption(t *testing.T, f *Fs) {
assert.NoError(t, err)
assert.NotPanics(t, func() {
_, err = ioutil.ReadAll(r)
_ = r.Close()
})
assert.NoError(t, err)
}