mirror of
https://github.com/ipfs/kubo.git
synced 2025-09-10 22:49:13 +08:00
skip ipns fuse tests in travis
This commit is contained in:
@ -8,3 +8,5 @@ go:
|
|||||||
|
|
||||||
script:
|
script:
|
||||||
- go test -v ./...
|
- go test -v ./...
|
||||||
|
|
||||||
|
env: TEST_NO_FUSE=1
|
||||||
|
@ -13,6 +13,17 @@ import (
|
|||||||
u "github.com/jbenet/go-ipfs/util"
|
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 {
|
func randBytes(size int) []byte {
|
||||||
b := make([]byte, size)
|
b := make([]byte, size)
|
||||||
rand.Read(b)
|
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) {
|
func setupIpnsTest(t *testing.T, node *core.IpfsNode) (*core.IpfsNode, *fstest.Mount) {
|
||||||
|
maybeSkipFuseTests(t)
|
||||||
|
|
||||||
var err error
|
var err error
|
||||||
if node == nil {
|
if node == nil {
|
||||||
node, err = core.NewMockNode()
|
node, err = core.NewMockNode()
|
||||||
|
Reference in New Issue
Block a user