diff --git a/tests/integration/accounts/base_account_test.go b/tests/integration/accounts/base_account_test.go index a50975b8ff79..8db4cbf1a9e3 100644 --- a/tests/integration/accounts/base_account_test.go +++ b/tests/integration/accounts/base_account_test.go @@ -51,12 +51,14 @@ func TestBaseAccount(t *testing.T) { } func sendTx(t *testing.T, ctx sdk.Context, app *simapp.SimApp, sender []byte, msg sdk.Msg) { + t.Helper() tx := sign(t, ctx, app, sender, privKey, msg) _, _, err := app.SimDeliver(app.TxEncode, tx) require.NoError(t, err) } func sign(t *testing.T, ctx sdk.Context, app *simapp.SimApp, from sdk.AccAddress, privKey cryptotypes.PrivKey, msg sdk.Msg) sdk.Tx { + t.Helper() r := rand.New(rand.NewSource(0)) accNum, err := app.AccountsKeeper.AccountByNumber.Get(ctx, from) @@ -81,12 +83,14 @@ func sign(t *testing.T, ctx sdk.Context, app *simapp.SimApp, from sdk.AccAddress } func bechify(t *testing.T, app *simapp.SimApp, addr []byte) string { + t.Helper() bech32, err := app.AuthKeeper.AddressCodec().BytesToString(addr) require.NoError(t, err) return bech32 } func fundAccount(t *testing.T, app *simapp.SimApp, ctx sdk.Context, addr sdk.AccAddress, amt string) { + t.Helper() require.NoError(t, testutil.FundAccount(ctx, app.BankKeeper, addr, coins(t, amt))) } diff --git a/tests/integration/accounts/bundler_test.go b/tests/integration/accounts/bundler_test.go index 1b94ddd78fa1..2fb88983ddf6 100644 --- a/tests/integration/accounts/bundler_test.go +++ b/tests/integration/accounts/bundler_test.go @@ -209,6 +209,7 @@ func TestMsgServer_ExecuteBundle(t *testing.T) { } func makeTx(t *testing.T, msg gogoproto.Message, sig []byte, xt *account_abstractionv1.TxExtension) []byte { + t.Helper() anyMsg, err := codectypes.NewAnyWithValue(msg) require.NoError(t, err) diff --git a/tests/systemtests/rpc_client.go b/tests/systemtests/rpc_client.go index 4714715be600..d0510cb62abd 100644 --- a/tests/systemtests/rpc_client.go +++ b/tests/systemtests/rpc_client.go @@ -61,7 +61,7 @@ func (r RPCClient) Invoke(ctx context.Context, method string, req, reply interfa var height int64 md, _ := metadata.FromOutgoingContext(ctx) if heights := md.Get(grpctypes.GRPCBlockHeightHeader); len(heights) > 0 { - height, err := strconv.ParseInt(heights[0], 10, 64) + height, err = strconv.ParseInt(heights[0], 10, 64) if err != nil { return err } @@ -71,9 +71,8 @@ func (r RPCClient) Invoke(ctx context.Context, method string, req, reply interfa } abciReq := abci.QueryRequest{ - Path: method, - Data: reqBz, - Height: height, + Path: method, + Data: reqBz, } abciOpts := rpcclient.ABCIQueryOptions{ diff --git a/tests/systemtests/system.go b/tests/systemtests/system.go index 7105ff400ed1..31194a7a65ee 100644 --- a/tests/systemtests/system.go +++ b/tests/systemtests/system.go @@ -823,7 +823,8 @@ func (l *EventListener) Subscribe(query string, cb EventConsumer) func() { eventsChan, err := l.client.WSEvents.Subscribe(ctx, "testing", query) require.NoError(l.t, err) cleanup := func() { - ctx, _ := context.WithTimeout(ctx, DefaultWaitTime) //nolint:govet // used in cleanup only + ctx, cancel := context.WithTimeout(ctx, DefaultWaitTime) //nolint:govet // used in cleanup only + defer cancel() go l.client.WSEvents.Unsubscribe(ctx, "testing", query) //nolint:errcheck // used by tests only done() }