diff --git a/internal/playlists/export_test.go b/internal/playlists/export_test.go new file mode 100644 index 00000000..26920459 --- /dev/null +++ b/internal/playlists/export_test.go @@ -0,0 +1,10 @@ +package playlists + +// Bridges for the external playlists_test package, whose integration helpers +// (newPool, seedTrack) live there. + +// RankedCandidate is rankedCandidate, for tests. +type RankedCandidate = rankedCandidate + +// OneCopyPerSong is oneCopyPerSong, for tests. +var OneCopyPerSong = oneCopyPerSong diff --git a/internal/playlists/song_copies_test.go b/internal/playlists/song_copies_test.go index 68f52d4f..5488b1b2 100644 --- a/internal/playlists/song_copies_test.go +++ b/internal/playlists/song_copies_test.go @@ -1,4 +1,4 @@ -package playlists +package playlists_test import ( "context" @@ -7,6 +7,7 @@ import ( "github.com/jackc/pgx/v5/pgtype" "git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq" + "git.fabledsword.com/bvandeusen/minstrel/internal/playlists" ) // A mix holds a song once (M498 #5438) and never a held-back video rip @@ -30,10 +31,10 @@ func TestOneCopyPerSong_Integration(t *testing.T) { t.Fatal(err) } - in := []rankedCandidate{ + in := []playlists.RankedCandidate{ {TrackID: single.ID}, {TrackID: rip.ID}, {TrackID: albumCut.ID}, {TrackID: other.ID}, {TrackID: clean.ID}, } - out, err := oneCopyPerSong(ctx, q, in) + out, err := playlists.OneCopyPerSong(ctx, q, in) if err != nil { t.Fatal(err) } diff --git a/web/src/lib/api/admin.suspect-sources.test.ts b/web/src/lib/api/admin.suspect-sources.test.ts index 00caca9c..0d90aee9 100644 --- a/web/src/lib/api/admin.suspect-sources.test.ts +++ b/web/src/lib/api/admin.suspect-sources.test.ts @@ -14,7 +14,9 @@ function track(id: string): AdminSuspectTrack { duration_sec: 180, disc_number: null, track_number: null, - markers: [] + markers: [], + verdict: null, + verdict_at: null }; }