test(subsonic): a library download by search3 leaves out the missing song
release / web (push) Successful in 1m18s
release / go (push) Successful in 1m46s
release / govulncheck (push) Successful in 18s
release / integration (push) Successful in 3m56s
release / android (push) Successful in 4m15s
release / Build signed APK (push) Successful in 4m46s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 23s
release / Verify release artifacts (tag releases only) (push) Skipped

The fixture's C has a missing file, and search3 now lists only what the
listener can play, as getAlbumList2 already did with the same fixture.
The paging test expected the old behaviour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-25 22:13:00 -05:00
co-authored by Claude Opus 5.5
parent 9207a7529d
commit de335333da
+3 -2
View File
@@ -143,7 +143,8 @@ func (f playHistoryFixture) search3Songs(t *testing.T, query string) (titles []s
}
// An app that keeps a copy of the library downloads it with an empty query,
// a page at a time; the pages must cover every song once.
// a page at a time; the pages must cover every playable song once. C's file
// is missing in this fixture, so it is left out without shortening a page.
func TestSearch3_EmptyQueryPagesThroughEverySong(t *testing.T) {
f := seedPlayHistory(t)
var all []string
@@ -154,7 +155,7 @@ func TestSearch3_EmptyQueryPagesThroughEverySong(t *testing.T) {
}
all = append(all, page...)
}
if want := []string{"A", "B", "C", "D", "E"}; !slices.Equal(all, want) {
if want := []string{"A", "B", "D", "E"}; !slices.Equal(all, want) {
t.Errorf("songs across pages = %v, want %v", all, want)
}
if page, code := f.search3Songs(t, `query=""&songCount=2`); code != 0 || !slices.Equal(page, []string{"A", "B"}) {