From 25d1f371c32e1de050337dd69d55f0c2c8b3d470 Mon Sep 17 00:00:00 2001
From: Matt Joiner <anacrolix@gmail.com>
Date: Fri, 22 Sep 2017 13:46:00 +1000
Subject: [PATCH] fs: Some test tidying

---
 fs/torrentfs_test.go | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/fs/torrentfs_test.go b/fs/torrentfs_test.go
index ab3ab4bc..45e0cee7 100644
--- a/fs/torrentfs_test.go
+++ b/fs/torrentfs_test.go
@@ -103,8 +103,9 @@ func TestUnmountWedged(t *testing.T) {
 	fuseConn, err := fuse.Mount(layout.MountDir)
 	if err != nil {
 		switch err.Error() {
-		case "cannot locate OSXFUSE",
-			"fusermount: exit status 1":
+		case "cannot locate OSXFUSE":
+			fallthrough
+		case "fusermount: exit status 1":
 			t.Skip(err)
 		}
 		t.Fatal(err)
@@ -134,9 +135,7 @@ func TestUnmountWedged(t *testing.T) {
 	go func() {
 		defer cancel()
 		_, err := ioutil.ReadFile(filepath.Join(layout.MountDir, tt.Info().Name))
-		if err == nil {
-			t.Fatal("expected error reading greeting")
-		}
+		require.Error(t, err)
 	}()
 
 	// Wait until the read has blocked inside the filesystem code.
@@ -159,9 +158,7 @@ func TestUnmountWedged(t *testing.T) {
 	}
 
 	err = fuseConn.Close()
-	if err != nil {
-		t.Fatalf("error closing fuse conn: %s", err)
-	}
+	assert.NoError(t, err)
 }
 
 func TestDownloadOnDemand(t *testing.T) {
-- 
2.51.0