mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 23:18:15 -05:00
Replace context.Background with testing.TB.Context where possible (#15416)
* Replace context.Background with testing.TB.Context where possible * Fix failing tests
This commit is contained in:
@@ -3,6 +3,9 @@ package historycmd
|
||||
import (
|
||||
"encoding/json"
|
||||
"flag"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/OffchainLabs/prysm/v6/cmd"
|
||||
"github.com/OffchainLabs/prysm/v6/cmd/validator/flags"
|
||||
"github.com/OffchainLabs/prysm/v6/io/file"
|
||||
@@ -13,8 +16,6 @@ import (
|
||||
"github.com/OffchainLabs/prysm/v6/validator/slashing-protection-history/format"
|
||||
mocks "github.com/OffchainLabs/prysm/v6/validator/testing"
|
||||
"github.com/urfave/cli/v2"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func setupCliCtx(
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package wallet
|
||||
|
||||
import (
|
||||
"context"
|
||||
"flag"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@@ -72,7 +71,7 @@ func TestRecoverDerivedWallet(t *testing.T) {
|
||||
cliCtx := createRecoverCliCtx(t, cfg)
|
||||
require.NoError(t, walletRecover(cliCtx))
|
||||
|
||||
ctx := context.Background()
|
||||
ctx := t.Context()
|
||||
w, err := wallet.OpenWallet(cliCtx.Context, &wallet.Config{
|
||||
WalletDir: cfg.walletDir,
|
||||
WalletPassword: password,
|
||||
|
||||
Reference in New Issue
Block a user