]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Tighten FUSE test skipping
authorMatt Joiner <anacrolix@gmail.com>
Thu, 1 Jun 2017 01:19:45 +0000 (11:19 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Thu, 1 Jun 2017 01:19:45 +0000 (11:19 +1000)
fs/torrentfs_test.go

index 53fcc400b06185796dedf2dc7517cc4b992b8c1d..dcd50fb882d9fa1dd32123f3608ed16651629ad0 100644 (file)
@@ -8,7 +8,6 @@ import (
        _ "net/http/pprof"
        "os"
        "path/filepath"
-       "strings"
        "testing"
        "time"
 
@@ -102,11 +101,11 @@ func TestUnmountWedged(t *testing.T) {
        fs := New(client)
        fuseConn, err := fuse.Mount(layout.MountDir)
        if err != nil {
-               msg := fmt.Sprintf("error mounting: %s", err)
-               if strings.Contains(err.Error(), "fuse") || err.Error() == "exit status 71" {
-                       t.Skip(msg)
+               switch err.Error() {
+               case "cannot locate OSXFUSE":
+                       t.Skip(err)
                }
-               t.Fatal(msg)
+               t.Fatal(err)
        }
        go func() {
                server := fusefs.New(fuseConn, &fusefs.Config{