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
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:
@@ -28,24 +28,6 @@ func newMBCAAProviderForTest(t *testing.T, mockURL string) *mbcaaProvider {
|
||||
return p
|
||||
}
|
||||
|
||||
func TestMBCAAProvider_ID(t *testing.T) {
|
||||
resetRegistryForTests()
|
||||
defer resetRegistryForTests()
|
||||
p := newMBCAAProvider(FetcherConfig{})
|
||||
if p.ID() != "mbcaa" {
|
||||
t.Errorf("ID = %q, want mbcaa", p.ID())
|
||||
}
|
||||
if p.DisplayName() != "Cover Art Archive" {
|
||||
t.Errorf("DisplayName = %q, want Cover Art Archive", p.DisplayName())
|
||||
}
|
||||
if p.RequiresAPIKey() {
|
||||
t.Error("RequiresAPIKey = true, want false")
|
||||
}
|
||||
if !p.DefaultEnabled() {
|
||||
t.Error("DefaultEnabled = false, want true")
|
||||
}
|
||||
}
|
||||
|
||||
func TestMBCAAProvider_FetchAlbumCover_Success(t *testing.T) {
|
||||
imageBody := []byte("FAKE_JPEG")
|
||||
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
Reference in New Issue
Block a user