• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lightningnetwork / lnd / 16291181271

15 Jul 2025 10:47AM UTC coverage: 57.167% (-10.2%) from 67.349%
16291181271

Pull #9822

github

web-flow
Merge dabf3ae6a into 302551ade
Pull Request #9822: Refactor Payments Code (Head PR for refactor to make sure the itest pass)

650 of 2407 new or added lines in 25 files covered. (27.0%)

28129 existing lines in 454 files now uncovered.

98745 of 172731 relevant lines covered (57.17%)

1.77 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/payments/db/test_kvdb.go
1
//go:build !test_db_sqlite && !test_db_postgres
2

3
package paymentsdb
4

5
import (
6
        "testing"
7

8
        "github.com/lightningnetwork/lnd/kvdb"
9
        "github.com/stretchr/testify/require"
10
)
11

12
// NewTestDB is a helper function that creates an BBolt database for testing.
NEW
13
func NewTestDB(t *testing.T, opts ...OptionModifier) PaymentDB {
×
NEW
14
        backend, backendCleanup, err := kvdb.GetTestBackend(
×
NEW
15
                t.TempDir(), "kvPaymentDB",
×
NEW
16
        )
×
NEW
17
        require.NoError(t, err)
×
NEW
18

×
NEW
19
        t.Cleanup(backendCleanup)
×
NEW
20

×
NEW
21
        paymentDB, err := NewKVStore(backend, opts...)
×
NEW
22
        require.NoError(t, err)
×
NEW
23

×
NEW
24
        return paymentDB
×
NEW
25
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc