]> Sergey Matveev's repositories - btrtrc.git/blobdiff - storage/issue96_test.go
Update to multiple-blobs-per-value squirrel
[btrtrc.git] / storage / issue96_test.go
index 1bdbbf15cb73e7bde6fb701c0e3347b527e14def..726c11c803148e80bffa2df3166e605505bf3b0b 100644 (file)
@@ -1,8 +1,6 @@
 package storage
 
 import (
-       "io/ioutil"
-       "os"
        "testing"
 
        "github.com/stretchr/testify/require"
@@ -10,11 +8,11 @@ import (
        "github.com/anacrolix/torrent/metainfo"
 )
 
-func testMarkedCompleteMissingOnRead(t *testing.T, csf func(string) ClientImpl) {
-       td, err := ioutil.TempDir("", "")
-       require.NoError(t, err)
-       defer os.RemoveAll(td)
-       cs := NewClient(csf(td))
+func testMarkedCompleteMissingOnRead(t *testing.T, csf func(string) ClientImplCloser) {
+       td := t.TempDir()
+       cic := csf(td)
+       defer cic.Close()
+       cs := NewClient(cic)
        info := &metainfo.Info{
                PieceLength: 1,
                Files:       []metainfo.FileInfo{{Path: []string{"a"}, Length: 1}},