use ioutil.TempDir for test directories

This commit is contained in:
vyzo 2021-03-02 10:53:24 +02:00
parent 35d466d847
commit 68213a92cb
2 changed files with 4 additions and 8 deletions

View File

@ -1,7 +1,7 @@
package splitstore
import (
"os"
"io/ioutil"
"testing"
cid "github.com/ipfs/go-cid"
@ -19,9 +19,7 @@ func TestBloomMarkSet(t *testing.T) {
func testMarkSet(t *testing.T, lsType string) {
t.Helper()
path := "/tmp/markset-test"
err := os.MkdirAll(path, 0777)
path, err := ioutil.TempDir("", "sweep-test.*")
if err != nil {
t.Fatal(err)
}

View File

@ -1,7 +1,7 @@
package splitstore
import (
"os"
"io/ioutil"
"testing"
cid "github.com/ipfs/go-cid"
@ -44,9 +44,7 @@ func testTrackingStore(t *testing.T, tsType string) {
}
}
path := "/tmp/markset-test"
err := os.MkdirAll(path, 0777)
path, err := ioutil.TempDir("", "snoop-test.*")
if err != nil {
t.Fatal(err)
}