mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-04 13:07:36 +03:00
revert: separation of write and read DBs
Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
parent
1bf94531fd
commit
3982ba7258
22 changed files with 78 additions and 161 deletions
|
@ -14,6 +14,7 @@ import (
|
|||
"github.com/navidrome/navidrome/tests"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
"github.com/pocketbase/dbx"
|
||||
)
|
||||
|
||||
func TestPersistence(t *testing.T) {
|
||||
|
@ -96,7 +97,7 @@ func P(path string) string {
|
|||
// Initialize test DB
|
||||
// TODO Load this data setup from file(s)
|
||||
var _ = BeforeSuite(func() {
|
||||
conn := NewDBXBuilder(db.Db())
|
||||
conn := GetDBXBuilder()
|
||||
ctx := log.NewContext(context.TODO())
|
||||
ctx = request.WithUser(ctx, adminUser)
|
||||
|
||||
|
@ -199,3 +200,7 @@ var _ = BeforeSuite(func() {
|
|||
songComeTogether.StarredAt = mf.StarredAt
|
||||
testSongs[1] = songComeTogether
|
||||
})
|
||||
|
||||
func GetDBXBuilder() *dbx.DB {
|
||||
return dbx.NewFromDB(db.Db(), db.Driver)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue