library, server: a fixture and a comment the leak gate refuses (#8358)

A hidden-folder fixture named an acquisition tool, and a comment cited a
milestone id. Both are reworded so the export passes ci/leakgate.sh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 20:07:36 -05:00
co-authored by Claude Opus 5.5
parent 126afefd77
commit fde5cbbafd
2 changed files with 7 additions and 7 deletions
+5 -5
View File
@@ -33,7 +33,7 @@ func libraryTree(t *testing.T, files ...string) string {
func TestEnumerate_LeavesHiddenFilesAndFoldersOut(t *testing.T) {
root := libraryTree(t,
"Artist/Album (2001)/01 Song.flac",
".sluice-held/Artist/Album (2001)/01 Song.flac",
".set-aside/Artist/Album (2001)/01 Song.flac",
"Artist/.cache/02 Other.mp3",
"Artist/Album (2001)/._01 Song.flac",
)
@@ -53,8 +53,8 @@ func TestHiddenInLibrary(t *testing.T) {
want bool
}{
{"Artist/Album/01.flac", false},
{".sluice-held/Artist/Album/01.flac", true},
{".sluice-held", true},
{".set-aside/Artist/Album/01.flac", true},
{".set-aside", true},
{"Artist/._01.flac", true},
{"Artist/Album..Live/01.flac", false},
{"", false},
@@ -73,13 +73,13 @@ func TestHiddenInLibrary(t *testing.T) {
// The watcher ignores a hidden folder appearing in the library, so nothing
// set aside in it is watched or queued for a scan.
func TestWatcher_IgnoresAHiddenFolderAppearing(t *testing.T) {
root := libraryTree(t, ".sluice-held/Artist/Album/01 Song.flac")
root := libraryTree(t, ".set-aside/Artist/Album/01 Song.flac")
w := &Watcher{
scanner: &Scanner{paths: []string{root}},
logger: slog.New(slog.NewTextHandler(io.Discard, nil)),
}
pending := map[string]struct{}{}
held := filepath.Join(root, ".sluice-held")
held := filepath.Join(root, ".set-aside")
if w.handleEvent(nil, fsnotify.Event{Name: held, Op: fsnotify.Create}, pending) || len(pending) != 0 {
t.Fatalf("a hidden folder appearing queued %v", pending)
}