test: invented artists, albums and MusicBrainz ids in place of real ones
release / web (push) Failing after 1m16s
release / go (push) Successful in 1m48s
release / govulncheck (push) Successful in 20s
release / integration (push) Successful in 4m0s
release / android (push) Successful in 4m34s
release / Build signed APK (push) Successful in 5m9s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Skipped
release / Verify release artifacts (tag releases only) (push) Skipped
release / web (push) Failing after 1m16s
release / go (push) Successful in 1m48s
release / govulncheck (push) Successful in 20s
release / integration (push) Successful in 4m0s
release / android (push) Successful in 4m34s
release / Build signed APK (push) Successful in 5m9s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Skipped
release / Verify release artifacts (tag releases only) (push) Skipped
Test data and example comments named real artists, records and songs, and carried real MusicBrainz ids. One mapping swaps them for invented ones throughout (Fields of Ontario, Plastic Apes, Marlo Davies, ...), keeping what each case tests: sort order, index letter, escaping, title keys, artist-prefix stripping. A test username is no longer the operator's name. The cover-art and Last.fm connection checks still query real releases; they reach live services and need something that exists there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -16,13 +16,13 @@ func TestWithoutGuests(t *testing.T) {
|
||||
{"Low Tide Choir [ft Ruby Calloway]", "Low Tide Choir"},
|
||||
{"Low Tide Choir FEAT. Ruby Calloway & Mae", "Low Tide Choir"},
|
||||
// Names that only look like a credit stay whole.
|
||||
{"Little Feat", "Little Feat"},
|
||||
{"Little Feat featuring Bonnie Raitt", "Little Feat"},
|
||||
{"Daft Punk", "Daft Punk"},
|
||||
{"Soft Cell", "Soft Cell"},
|
||||
{"Tiny Feat", "Tiny Feat"},
|
||||
{"Tiny Feat featuring Bonnie Rains", "Tiny Feat"},
|
||||
{"Deft Monks", "Deft Monks"},
|
||||
{"Loft Cell", "Loft Cell"},
|
||||
{"Featuring Fools", "Featuring Fools"},
|
||||
{"Simon & Garfunkel", "Simon & Garfunkel"},
|
||||
{"St. Paul & The Broken Bones", "St. Paul & The Broken Bones"},
|
||||
{"Simone & Garfield", "Simone & Garfield"},
|
||||
{"St. Mark & The Mended Bones", "St. Mark & The Mended Bones"},
|
||||
}
|
||||
for _, tc := range tests {
|
||||
if got := withoutGuests(tc.credit); got != tc.want {
|
||||
@@ -65,15 +65,15 @@ func TestReadArtistCredit_ID3(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "an & the file does not list is one artist",
|
||||
artist: "St. Paul & The Broken Bones",
|
||||
raw: map[string]interface{}{"TXXX": &tag.Comm{Description: "ARTISTS", Text: "St. Paul & The Broken Bones"}},
|
||||
want: artistCredit{Name: "St. Paul & The Broken Bones"},
|
||||
artist: "St. Mark & The Mended Bones",
|
||||
raw: map[string]interface{}{"TXXX": &tag.Comm{Description: "ARTISTS", Text: "St. Mark & The Mended Bones"}},
|
||||
want: artistCredit{Name: "St. Mark & The Mended Bones"},
|
||||
},
|
||||
{
|
||||
name: "a v2.3 list has no separator, so a slash stays in the name",
|
||||
artist: "AC/DC",
|
||||
raw: map[string]interface{}{"TXXX_0": &tag.Comm{Description: "Artists", Text: "AC/DC"}},
|
||||
want: artistCredit{Name: "AC/DC"},
|
||||
artist: "AM/FM",
|
||||
raw: map[string]interface{}{"TXXX_0": &tag.Comm{Description: "Artists", Text: "AM/FM"}},
|
||||
want: artistCredit{Name: "AM/FM"},
|
||||
},
|
||||
{
|
||||
name: "no artist at all",
|
||||
@@ -116,14 +116,14 @@ func TestReadArtistCredit_FLACListsItsArtists(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestReadArtistCredit_FLACWithOneArtist(t *testing.T) {
|
||||
data := buildFLAC(false, "ARTIST=Marina & the Kats", "ARTISTS=Marina & the Kats", "MUSICBRAINZ_ARTISTID=id-kats")
|
||||
data := buildFLAC(false, "ARTIST=Marisa & the Cats", "ARTISTS=Marisa & the Cats", "MUSICBRAINZ_ARTISTID=id-kats")
|
||||
rs := bytes.NewReader(data)
|
||||
meta, err := tag.ReadFrom(rs)
|
||||
if err != nil {
|
||||
t.Fatalf("tag.ReadFrom: %v", err)
|
||||
}
|
||||
got := readArtistCredit(meta, rs, ReadTagMBIDs(meta))
|
||||
if want := (artistCredit{Name: "Marina & the Kats", MBID: "id-kats"}); got != want {
|
||||
if want := (artistCredit{Name: "Marisa & the Cats", MBID: "id-kats"}); got != want {
|
||||
t.Errorf("readArtistCredit = %+v, want %+v", got, want)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user