From f8dfec26de1e4f77da6188f71b303c90d71bc3ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joel=20Midstj=C3=A4rna?= Date: Sat, 4 Jan 2020 08:31:10 +0100 Subject: [PATCH] Fixed issues reported by go report --- media_test.go | 6 +++--- watcher_test.go | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/media_test.go b/media_test.go index 38bc194..9d39f1b 100644 --- a/media_test.go +++ b/media_test.go @@ -237,10 +237,10 @@ func TestRelativePath(t *testing.T) { } // Errors - result, err = media.getRelativePath("another", "directory") + _, err = media.getRelativePath("another", "directory") assertExpectErr(t, "", err) - result, err = media.getRelativePath("/a", "b") + _, err = media.getRelativePath("/a", "b") assertExpectErr(t, "", err) // getRelativeMediaPath @@ -248,7 +248,7 @@ func TestRelativePath(t *testing.T) { assertExpectNoErr(t, "", err) assertEqualsStr(t, "", "dir1/dir2", result) - result, err = media.getRelativeMediaPath("another/dir1/dir2") + _, err = media.getRelativeMediaPath("another/dir1/dir2") assertExpectErr(t, "", err) } diff --git a/watcher_test.go b/watcher_test.go index 4a80cd6..df398bd 100644 --- a/watcher_test.go +++ b/watcher_test.go @@ -225,6 +225,7 @@ func TestWatchFolder(t *testing.T) { media := createMedia(box, "testmedia", ".", true, false, false, true, false, 0) watcher, err := fsnotify.NewWatcher() + assertExpectNoErr(t, "", err) // Test some valid err = media.watcher.watchFolder(watcher, "testmedia")