mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-20 04:21:37 +02:00
multi: context.Background() -> t.Context()
Use the new feature of Go 1.24, fix linter warnings. This change was produced by: - running golangci-lint run --fix - sed 's/context.Background/t.Context/' -i `git grep -l context.Background | grep test.go` - manually fixing broken tests - itest, lntest: use ht.Context() where ht or hn is available - in HarnessNode.Stop() we keep using context.Background(), because it is called from a cleanup handler in which t.Context() is canceled already.
This commit is contained in:
@@ -9,7 +9,6 @@ import (
|
||||
"github.com/btcsuite/btcwallet/walletdb"
|
||||
"github.com/btcsuite/btcwallet/walletdb/walletdbtest"
|
||||
"github.com/stretchr/testify/require"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
// TestInterface performs all interfaces tests for this database driver.
|
||||
@@ -24,7 +23,7 @@ func TestInterface(t *testing.T) {
|
||||
// dbType is the database type name for this driver.
|
||||
const dbType = "postgres"
|
||||
|
||||
ctx := context.Background()
|
||||
ctx := t.Context()
|
||||
cfg := &Config{
|
||||
Dsn: f.Dsn,
|
||||
}
|
||||
|
Reference in New Issue
Block a user