mirror of
https://github.com/ipfs/kubo.git
synced 2025-09-09 23:42:20 +08:00
skip ipns fuse tests in travis
This commit is contained in:
@ -8,3 +8,5 @@ go:
|
||||
|
||||
script:
|
||||
- go test -v ./...
|
||||
|
||||
env: TEST_NO_FUSE=1
|
||||
|
@ -13,6 +13,17 @@ import (
|
||||
u "github.com/jbenet/go-ipfs/util"
|
||||
)
|
||||
|
||||
func maybeSkipFuseTests(t *testing.T) bool {
|
||||
v := "TEST_NO_FUSE"
|
||||
n := strings.ToLower(os.Getenv(v))
|
||||
skip := n != "" && n != "false" && n != "f"
|
||||
|
||||
if skip {
|
||||
t.Skipf("Skipping FUSE tests (%s=%s)", v, n)
|
||||
}
|
||||
return skip
|
||||
}
|
||||
|
||||
func randBytes(size int) []byte {
|
||||
b := make([]byte, size)
|
||||
rand.Read(b)
|
||||
@ -47,6 +58,8 @@ func writeFileData(t *testing.T, data []byte, path string) []byte {
|
||||
}
|
||||
|
||||
func setupIpnsTest(t *testing.T, node *core.IpfsNode) (*core.IpfsNode, *fstest.Mount) {
|
||||
maybeSkipFuseTests(t)
|
||||
|
||||
var err error
|
||||
if node == nil {
|
||||
node, err = core.NewMockNode()
|
||||
|
Reference in New Issue
Block a user