fix macos build when fuse is enabled

Instead of trying to export the `errNeedFuseVersion` type, just use string
matching. It's good enough for testing and the alternative was annoying.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
This commit is contained in:
Steven Allen 2019-04-18 18:10:29 -07:00
parent 739f762b22
commit a3bdfd68de
3 changed files with 2 additions and 5 deletions

View File

@ -8,8 +8,6 @@ import (
core "github.com/ipfs/go-ipfs/core"
)
type errNeedFuseVersion error // used in tests, needed in OSX
func Mount(node *core.IpfsNode, fsdir, nsdir string) error {
return errors.New("not compiled in")
}

View File

@ -5,6 +5,7 @@ package node
import (
"io/ioutil"
"os"
"strings"
"testing"
"time"
@ -63,7 +64,7 @@ func TestExternalUnmount(t *testing.T) {
mkdir(t, ipnsDir)
err = Mount(node, ipfsDir, ipnsDir)
if _, ok := err.(errNeedFuseVersion); ok || err == fuse.ErrOSXFUSENotFound {
if strings.Contains(err.Error(), "unable to check fuse version") || err == fuse.ErrOSXFUSENotFound {
t.Skip(err)
}
if err != nil {

View File

@ -30,8 +30,6 @@ var platformFuseChecks = func(*core.IpfsNode) error {
return nil
}
type errNeedFuseVersion error // used in tests, needed in OSX
func Mount(node *core.IpfsNode, fsdir, nsdir string) error {
// check if we already have live mounts.
// if the user said "Mount", then there must be something wrong.