lotus/node/repo/fsrepo_test.go
Jakub Sztandera d484e4ffb9 Run tests and fix some bugs
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2019-07-10 17:11:10 +02:00

27 lines
409 B
Go

package repo
import "io/ioutil"
import "os"
import "testing"
func genFsRepo(t *testing.T) (*FsRepo, func()) {
path, err := ioutil.TempDir("", "lotus-repo-*")
if err != nil {
t.Fatal(err)
}
repo, err := NewFS(path)
if err != nil {
t.Fatal(err)
}
return repo, func() {
os.RemoveAll(path)
}
}
func TestFsBasic(t *testing.T) {
repo, closer := genFsRepo(t)
defer closer()
basicTest(t, repo)
}