2
2
mirror of https://github.com/octoleo/restic.git synced 2024-12-26 20:30:19 +00:00

Merge pull request #3947 from MichaelEischer/fix-cache-verify-test

cache: Fix file descriptor leak in TestBackendRemoveBroken
This commit is contained in:
Michael Eischer 2022-10-03 00:19:26 +02:00 committed by GitHub
commit 7ce4cb7908
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -199,6 +199,9 @@ func TestBackendRemoveBroken(t *testing.T) {
// check that the cache now contains the correct data
rd, err := c.load(h, 0, 0)
defer func() {
_ = rd.Close()
}()
test.OK(t, err)
cached, err := ioutil.ReadAll(rd)
test.OK(t, err)