lotus/node/repo/fsrepo_test.go

27 lines
352 B
Go
Raw Normal View History

2021-11-01 00:24:26 +00:00
//stm: #unit
package repo
import (
"testing"
)
func genFsRepo(t *testing.T) *FsRepo {
path := t.TempDir()
repo, err := NewFS(path)
if err != nil {
t.Fatal(err)
}
2019-11-12 17:59:38 +00:00
err = repo.Init(FullNode)
if err != ErrRepoExists && err != nil {
t.Fatal(err)
}
return repo
}
func TestFsBasic(t *testing.T) {
repo := genFsRepo(t)
basicTest(t, repo)
}