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:
@@ -26,9 +26,9 @@ func TestRender_EveryKindHasATitleAndALink(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestRender_NewMusicOpensWhatArrived(t *testing.T) {
|
||||
one := render(KindNewMusic, Payload{Count: 1, Albums: []Arrival{{Artist: "Moe Shop", Title: "WWW", AlbumID: "al-1"}}})
|
||||
one := render(KindNewMusic, Payload{Count: 1, Albums: []Arrival{{Artist: "Mochi Shop", Title: "XYZ", AlbumID: "al-1"}}})
|
||||
require.Equal(t, "New album", one.Title)
|
||||
require.Equal(t, "Moe Shop – WWW is in the library.", one.Body)
|
||||
require.Equal(t, "Mochi Shop – XYZ is in the library.", one.Body)
|
||||
require.Equal(t, "/albums/al-1", one.Link)
|
||||
|
||||
// Several open Home, whose Recently added row starts with them; the
|
||||
@@ -42,8 +42,8 @@ func TestRender_NewMusicOpensWhatArrived(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestRender_FlagCarriesTheReasonWhenThereIsOne(t *testing.T) {
|
||||
require.Equal(t, "Ann flagged WWW.", render(KindQuarantineFlagged, Payload{Name: "WWW", Actor: "Ann"}).Body)
|
||||
require.Equal(t, "Ann flagged WWW: bad rip", render(KindQuarantineFlagged, Payload{Name: "WWW", Actor: "Ann", Reason: "bad rip"}).Body)
|
||||
require.Equal(t, "Ann flagged XYZ.", render(KindQuarantineFlagged, Payload{Name: "XYZ", Actor: "Ann"}).Body)
|
||||
require.Equal(t, "Ann flagged XYZ: bad rip", render(KindQuarantineFlagged, Payload{Name: "XYZ", Actor: "Ann", Reason: "bad rip"}).Body)
|
||||
}
|
||||
|
||||
func TestRender_CoalescedCountsReadNaturally(t *testing.T) {
|
||||
@@ -56,8 +56,8 @@ func TestRender_CoalescedCountsReadNaturally(t *testing.T) {
|
||||
|
||||
// A notice says which, not only how many.
|
||||
func TestRender_NamesWhatChanged(t *testing.T) {
|
||||
require.Equal(t, "No longer on disk: Weezer – Buddy Holly.",
|
||||
render(KindTracksMissing, Payload{Count: 1, Items: []string{"Weezer – Buddy Holly"}}).Body)
|
||||
require.Equal(t, "No longer on disk: Glasshouse – Lucky Penny.",
|
||||
render(KindTracksMissing, Payload{Count: 1, Items: []string{"Glasshouse – Lucky Penny"}}).Body)
|
||||
require.Equal(t, "No longer on disk: A – 1 and B – 2.",
|
||||
render(KindTracksMissing, Payload{Count: 2, Items: []string{"A – 1", "B – 2"}}).Body)
|
||||
// Three are named; the rest of the count, not only the rest of the
|
||||
@@ -67,8 +67,8 @@ func TestRender_NamesWhatChanged(t *testing.T) {
|
||||
require.Equal(t, "12 new duplicates to review", render(KindDuplicatesFound, Payload{Count: 12}).Title)
|
||||
require.Equal(t, "Extra copies removed, the right one kept: A and B.",
|
||||
render(KindDuplicatesResolved, Payload{Count: 2, Items: []string{"A", "B"}}).Body)
|
||||
require.Equal(t, "Failed to play: Weezer – Buddy Holly (alice).",
|
||||
render(KindPlaybackErrors, Payload{Count: 1, Items: []string{"Weezer – Buddy Holly (alice)"}}).Body)
|
||||
require.Equal(t, "Failed to play: Glasshouse – Lucky Penny (alice).",
|
||||
render(KindPlaybackErrors, Payload{Count: 1, Items: []string{"Glasshouse – Lucky Penny (alice)"}}).Body)
|
||||
}
|
||||
|
||||
func TestRender_RowsFromBeforeItemsReadAsTheyDid(t *testing.T) {
|
||||
@@ -91,5 +91,5 @@ func TestRender_AnUnreadablePayloadStillRenders(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPayloadMap_DropsEmptyFields(t *testing.T) {
|
||||
require.Equal(t, map[string]any{"name": "WWW", "count": float64(2)}, Payload{Name: "WWW", Count: 2}.Map())
|
||||
require.Equal(t, map[string]any{"name": "XYZ", "count": float64(2)}, Payload{Name: "XYZ", Count: 2}.Map())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user