From d7edbf93f0fc3b9bcf87221189c933c791331de8 Mon Sep 17 00:00:00 2001 From: Deluan Date: Fri, 24 Apr 2020 11:05:17 -0400 Subject: [PATCH] Make test more reliable In some systems, it was detecting the `go.mod` file as an audio file, probably because of the system's mime-type configuration --- scanner/metadata_test.go | 4 ++-- tests/empty_folder/not_an_audio_file.txt | 0 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 tests/empty_folder/not_an_audio_file.txt diff --git a/scanner/metadata_test.go b/scanner/metadata_test.go index cf2f1a84e..649fc02a4 100644 --- a/scanner/metadata_test.go +++ b/scanner/metadata_test.go @@ -62,7 +62,7 @@ var _ = Describe("Metadata", func() { }) It("returns empty map if there are no audio files in path", func() { - Expect(LoadAllAudioFiles(".")).To(BeEmpty()) + Expect(LoadAllAudioFiles("tests/empty_folder")).To(BeEmpty()) }) }) @@ -231,7 +231,7 @@ Tracklist: It("creates a valid command line", func() { args := createProbeCommand([]string{"/music library/one.mp3", "/music library/two.mp3"}) - Expect(args).To(Equal([]string{"ffmpeg", "-i", "/music library/one.mp3", "-i", "/music library/two.mp3", "-f", "ffmetadata" })) + Expect(args).To(Equal([]string{"ffmpeg", "-i", "/music library/one.mp3", "-i", "/music library/two.mp3", "-f", "ffmetadata"})) }) }) diff --git a/tests/empty_folder/not_an_audio_file.txt b/tests/empty_folder/not_an_audio_file.txt new file mode 100644 index 000000000..e69de29bb