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:
@@ -42,7 +42,7 @@ func newSongLinkFixture(t *testing.T, pool *pgxpool.Pool) songLinkFixture {
|
||||
t.Fatal(err)
|
||||
}
|
||||
tr, err := q.UpsertTrack(ctx, dbq.UpsertTrackParams{
|
||||
Title: "Feel Good Inc.", AlbumID: a.ID, ArtistID: artist.ID,
|
||||
Title: "Feel Fine Ltd.", AlbumID: a.ID, ArtistID: artist.ID,
|
||||
DurationMs: 1000, FilePath: path, FileSize: 100, FileFormat: "mp3",
|
||||
})
|
||||
if err != nil {
|
||||
@@ -51,8 +51,8 @@ func newSongLinkFixture(t *testing.T, pool *pgxpool.Pool) songLinkFixture {
|
||||
return tr
|
||||
}
|
||||
f := songLinkFixture{
|
||||
single: track("Feel Good Inc. (single)", "/music/Link Artist/Feel Good Inc/01 Feel Good Inc.mp3"),
|
||||
albumCut: track("Demon Days", "/music/Link Artist/Demon Days/06 Feel Good Inc.mp3"),
|
||||
single: track("Feel Fine Ltd. (single)", "/music/Link Artist/Feel Fine Ltd/01 Feel Fine Ltd.mp3"),
|
||||
albumCut: track("Ghost Nights", "/music/Link Artist/Ghost Nights/06 Feel Fine Ltd.mp3"),
|
||||
}
|
||||
f.user, err = q.CreateUser(ctx, dbq.CreateUserParams{
|
||||
Username: dbtest.TestUserPrefix + "song-link", PasswordHash: "x", ApiTokenHash: "song-link-token",
|
||||
@@ -221,7 +221,7 @@ func songKeys(t *testing.T, q *dbq.Queries, ids ...pgtype.UUID) []pgtype.UUID {
|
||||
return out
|
||||
}
|
||||
|
||||
// A cross-release group whose album holds the song twice (Humanz: Saturnz
|
||||
// A cross-release group whose album holds the song twice (Mammalz: Neptunez
|
||||
// Barz as a FLAC and a YouTube mp3, beside the single): the album's
|
||||
// extra copy is merged into its FLAC, the single stays, and the two copies
|
||||
// left are linked as one song.
|
||||
@@ -230,7 +230,7 @@ func TestResolveDuplicates_FoldsAnAlbumsExtraCopyInACrossReleaseGroup_Integratio
|
||||
ctx := context.Background()
|
||||
q := dbq.New(pool)
|
||||
dir := t.TempDir()
|
||||
artist, err := q.UpsertArtist(ctx, dbq.UpsertArtistParams{Name: "Gorillaz", SortName: "Gorillaz"})
|
||||
artist, err := q.UpsertArtist(ctx, dbq.UpsertArtistParams{Name: "Plastic Apes", SortName: "Plastic Apes"})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -254,7 +254,7 @@ func TestResolveDuplicates_FoldsAnAlbumsExtraCopyInACrossReleaseGroup_Integratio
|
||||
t.Fatal(err)
|
||||
}
|
||||
tr, err := q.UpsertTrack(ctx, dbq.UpsertTrackParams{
|
||||
Title: "Saturnz Barz", AlbumID: a.ID, ArtistID: artist.ID,
|
||||
Title: "Neptunez Barz", AlbumID: a.ID, ArtistID: artist.ID,
|
||||
DurationMs: 181000, FilePath: path, FileSize: 100, FileFormat: format,
|
||||
})
|
||||
if err != nil {
|
||||
@@ -262,12 +262,12 @@ func TestResolveDuplicates_FoldsAnAlbumsExtraCopyInACrossReleaseGroup_Integratio
|
||||
}
|
||||
return tr
|
||||
}
|
||||
flac := track("Humanz", "04 Saturnz Barz.flac", "flac")
|
||||
mp3 := track("Humanz", "06 Saturnz Barz (feat. Popcaan).mp3", "mp3")
|
||||
single := track("Saturnz Barz", "01 Saturnz Barz.mp3", "mp3")
|
||||
flac := track("Mammalz", "04 Neptunez Barz.flac", "flac")
|
||||
mp3 := track("Mammalz", "06 Neptunez Barz (feat. Popcaan).mp3", "mp3")
|
||||
single := track("Neptunez Barz", "01 Neptunez Barz.mp3", "mp3")
|
||||
var groupID pgtype.UUID
|
||||
if err := pool.QueryRow(ctx,
|
||||
`INSERT INTO duplicate_groups (member_key, tier) VALUES ('humanz-saturnz', 'exact') RETURNING id`,
|
||||
`INSERT INTO duplicate_groups (member_key, tier) VALUES ('mammalz-neptunez', 'exact') RETURNING id`,
|
||||
).Scan(&groupID); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user