package storage
import (
- "io/ioutil"
- "os"
"testing"
"github.com/stretchr/testify/require"
)
func testMarkedCompleteMissingOnRead(t *testing.T, csf func(string) ClientImplCloser) {
- td, err := ioutil.TempDir("", "")
- require.NoError(t, err)
- defer os.RemoveAll(td)
- cs := NewClient(csf(td))
+ 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}},