@@ -5,31 +5,35 @@ package firewalldb
55import (
66 "testing"
77
8+ "github.com/lightninglabs/lightning-terminal/session"
89 "github.com/lightningnetwork/lnd/clock"
910 "github.com/stretchr/testify/require"
1011)
1112
1213// NewTestDB is a helper function that creates an BBolt database for testing.
13- func NewTestDB (t * testing.T , clock clock.Clock ) * BoltDB {
14+ func NewTestDB (t * testing.T , clock clock.Clock ) FirewallDBs {
1415 return NewTestDBFromPath (t , t .TempDir (), clock )
1516}
1617
1718// NewTestDBFromPath is a helper function that creates a new BoltStore with a
1819// connection to an existing BBolt database for testing.
19- func NewTestDBFromPath (t * testing.T , dbPath string , clock clock.Clock ) * BoltDB {
20+ func NewTestDBFromPath (t * testing.T , dbPath string ,
21+ clock clock.Clock ) FirewallDBs {
22+
2023 return newDBFromPathWithSessions (t , dbPath , nil , nil , clock )
2124}
2225
2326// NewTestDBWithSessions creates a new test BoltDB Store with access to an
2427// existing sessions DB.
25- func NewTestDBWithSessions (t * testing.T , sessStore SessionDB ,
26- clock clock.Clock ) * BoltDB {
28+ func NewTestDBWithSessions (t * testing.T , sessStore session. Store ,
29+ clock clock.Clock ) FirewallDBs {
2730
2831 return newDBFromPathWithSessions (t , t .TempDir (), sessStore , nil , clock )
2932}
3033
3134func newDBFromPathWithSessions (t * testing.T , dbPath string ,
32- sessStore SessionDB , acctStore AccountsDB , clock clock.Clock ) * BoltDB {
35+ sessStore session.Store , acctStore AccountsDB ,
36+ clock clock.Clock ) FirewallDBs {
3337
3438 store , err := NewBoltDB (dbPath , DBFilename , sessStore , acctStore , clock )
3539 require .NoError (t , err )
0 commit comments