@@ -6,42 +6,46 @@ import (
66 "testing"
77
88 "github.com/lightninglabs/lightning-terminal/accounts"
9+ "github.com/lightninglabs/lightning-terminal/session"
910 "github.com/lightningnetwork/lnd/clock"
1011 "github.com/lightningnetwork/lnd/fn"
1112 "github.com/stretchr/testify/require"
1213)
1314
1415// NewTestDB is a helper function that creates an BBolt database for testing.
15- func NewTestDB (t * testing.T , clock clock.Clock ) * BoltDB {
16+ func NewTestDB (t * testing.T , clock clock.Clock ) FirewallDBs {
1617 return NewTestDBFromPath (t , t .TempDir (), clock )
1718}
1819
1920// NewTestDBFromPath is a helper function that creates a new BoltStore with a
2021// connection to an existing BBolt database for testing.
21- func NewTestDBFromPath (t * testing.T , dbPath string , clock clock.Clock ) * BoltDB {
22+ func NewTestDBFromPath (t * testing.T , dbPath string ,
23+ clock clock.Clock ) FirewallDBs {
24+
2225 return newDBFromPathWithSessions (t , dbPath , nil , nil , clock )
2326}
2427
2528// NewTestDBWithSessions creates a new test BoltDB Store with access to an
2629// existing sessions DB.
27- func NewTestDBWithSessions (t * testing.T , sessStore SessionDB ,
28- clock clock.Clock ) * BoltDB {
30+ func NewTestDBWithSessions (t * testing.T , sessStore session. Store ,
31+ clock clock.Clock ) FirewallDBs {
2932
3033 return newDBFromPathWithSessions (t , t .TempDir (), sessStore , nil , clock )
3134}
3235
3336// NewTestDBWithSessionsAndAccounts creates a new test BoltDB Store with access
3437// to an existing sessions DB and accounts DB.
35- func NewTestDBWithSessionsAndAccounts (t * testing.T , sessStore SessionDB ,
36- acctStore AccountsDB , clock clock.Clock ) * BoltDB {
38+ func NewTestDBWithSessionsAndAccounts (t * testing.T , sessStore session. Store ,
39+ acctStore AccountsDB , clock clock.Clock ) FirewallDBs {
3740
3841 return newDBFromPathWithSessions (
3942 t , t .TempDir (), sessStore , acctStore , clock ,
4043 )
4144}
4245
4346func newDBFromPathWithSessions (t * testing.T , dbPath string ,
44- sessStore SessionDB , acctStore AccountsDB , clock clock.Clock ) * BoltDB {
47+ sessStore session.Store , acctStore AccountsDB ,
48+ clock clock.Clock ) FirewallDBs {
4549
4650 store , err := NewBoltDB (dbPath , DBFilename , sessStore , acctStore , clock )
4751 require .NoError (t , err )
0 commit comments