test(coverart, subsonic, server): merge repeated cases into tables (#8298)
release / web (push) Successful in 1m35s
release / go (push) Successful in 1m58s
release / govulncheck (push) Successful in 19s
release / integration (push) Successful in 3m0s
release / android (push) Successful in 4m26s
release / Attach APK to the Release (tag releases only) (push) Canceled after 0s
release / Build + push container image (push) Canceled after 0s
release / Publish the release image to GHCR (dispatch only) (push) Canceled after 0s
release / Verify release artifacts (tag releases only) (push) Canceled after 0s
release / Build signed APK (push) Canceled after 5m8s

- coverart: the four providers' identity and default tests, Last.fm's five
  not-found-without-asking tests, the four "which artists are asked again"
  database tests (now one reset over four artists), and the thumbnail-only
  and fanart-only tests.
- subsonic: getUser's six tests and decodePassword's three, one table each.
  Dropped TestTokenMD5Derivation: it checked crypto/md5 against a constant
  and called no Minstrel code.
- server: the four web-app-versus-API path tests start one server, not four.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-02 13:58:07 -05:00
co-authored by Claude Opus 5.5
parent bd95cdb105
commit 10b10b8179
9 changed files with 214 additions and 540 deletions
@@ -39,21 +39,6 @@ func newTheAudioDBProviderForTest(t *testing.T, mockURL string) *theAudioDBProvi
return p
}
func TestTheAudioDB_ID(t *testing.T) {
resetRegistryForTests()
defer resetRegistryForTests()
p := &theAudioDBProvider{}
if p.ID() != "theaudiodb" {
t.Errorf("ID = %q, want theaudiodb", p.ID())
}
if !p.RequiresAPIKey() {
t.Error("RequiresAPIKey = false, want true")
}
if !p.DefaultEnabled() {
t.Error("DefaultEnabled = false, want true")
}
}
func TestTheAudioDB_FetchAlbumCover_Success(t *testing.T) {
imageBody := []byte("FAKE_JPEG")
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {