@@ -2,17 +2,16 @@ package session
22
33import (
44 "context"
5- "database/sql"
65 "fmt"
76 "testing"
87 "time"
98
109 "github.com/lightninglabs/lightning-terminal/accounts"
11- "github.com/lightninglabs/lightning-terminal/db"
10+ "github.com/lightninglabs/lightning-terminal/db/sqlc "
1211 "github.com/lightningnetwork/lnd/clock"
1312 "github.com/lightningnetwork/lnd/lnwire"
1413 "github.com/lightningnetwork/lnd/macaroons"
15- "github.com/lightningnetwork/lnd/sqldb"
14+ "github.com/lightningnetwork/lnd/sqldb/v2 "
1615 "github.com/stretchr/testify/require"
1716 "go.etcd.io/bbolt"
1817 "golang.org/x/exp/rand"
@@ -38,7 +37,7 @@ func TestSessionsStoreMigration(t *testing.T) {
3837 }
3938
4039 makeSQLDB := func (t * testing.T , acctStore accounts.Store ) (* SQLStore ,
41- * db. TransactionExecutor [SQLQueries ]) {
40+ * SQLQueriesExecutor [SQLQueries ]) {
4241
4342 // Create a sql store with a linked account store.
4443 testDBStore := NewTestDBWithAccounts (t , clock , acctStore )
@@ -48,13 +47,9 @@ func TestSessionsStoreMigration(t *testing.T) {
4847
4948 baseDB := store .BaseDB
5049
51- genericExecutor := db .NewTransactionExecutor (
52- baseDB , func (tx * sql.Tx ) SQLQueries {
53- return baseDB .WithTx (tx )
54- },
55- )
50+ queries := sqlc .NewForType (baseDB , baseDB .BackendType )
5651
57- return store , genericExecutor
52+ return store , NewSQLQueriesExecutor ( baseDB , queries )
5853 }
5954
6055 // assertMigrationResults asserts that the sql store contains the
@@ -375,7 +370,7 @@ func TestSessionsStoreMigration(t *testing.T) {
375370 return MigrateSessionStoreToSQL (
376371 ctx , kvStore .DB , tx ,
377372 )
378- },
373+ }, sqldb . NoOpReset ,
379374 )
380375 require .NoError (t , err )
381376
0 commit comments