Skip to content

Commit 4f7c6fc

Browse files
firewalldb: update kvdb assertEqualActions
The upcoming commit will update the `AddActionReq` struct to include an extra field which the `kvdb` actions store will ignore. Therefore the `assertEqualActions` for the `kvdb` version will need to be update to ignore this field. In preparation for that change, we also do another optimization of the `assertEqualActions` function under kvdb builds, to not mutate the passed action references.
1 parent bce4c04 commit 4f7c6fc

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

firewalldb/test_kvdb.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ package firewalldb
55
import (
66
"testing"
77

8-
"github.com/lightninglabs/lightning-terminal/accounts"
98
"github.com/lightninglabs/lightning-terminal/session"
109
"github.com/lightningnetwork/lnd/clock"
11-
"github.com/lightningnetwork/lnd/fn"
1210
"github.com/stretchr/testify/require"
1311
)
1412

@@ -59,8 +57,9 @@ func newDBFromPathWithSessions(t *testing.T, dbPath string,
5957

6058
func assertEqualActions(t *testing.T, expected, got *Action) {
6159
// Accounts are not explicitly linked in our bbolt DB implementation.
60+
actualAccountID := got.AccountID
6261
got.AccountID = expected.AccountID
6362
require.Equal(t, expected, got)
6463

65-
got.AccountID = fn.None[accounts.AccountID]()
64+
got.AccountID = actualAccountID
6665
}

0 commit comments

Comments
 (0)