test: one test-database opener, dbtest.Pool, in place of 39 copies (#8002)
Every package carried its own testPool/newPool/newTestPool: skip under -short or without MINSTREL_TEST_DATABASE_URL, migrate, connect, register the close, and usually ResetDB. dbtest.Open does the first four (migrating once per test binary) and dbtest.Pool adds the reset. The per-package wrappers that did nothing else are gone; fixture helpers that seed rows keep their own signatures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -38,7 +38,7 @@ func newMusicNotices(t *testing.T, q *dbq.Queries, user dbq.User) []notification
|
||||
// into an empty library is the library being set up, and an album that only
|
||||
// formed because tracks already held were retagged into it is not new music.
|
||||
func TestAnnounceNewAlbums_TellsEveryoneOfEachNewAlbumOnce(t *testing.T) {
|
||||
pool := newPool(t)
|
||||
pool := dbtest.Pool(t)
|
||||
admin := notifyingAdmin(t, pool)
|
||||
ctx := context.Background()
|
||||
q := dbq.New(pool)
|
||||
|
||||
Reference in New Issue
Block a user