cosmos-sdk/client/query_test.go
Zachary Becker fd170b5140
feat: Update Cosmos SDK to CometBFT v2 (#24837)
Co-authored-by: aljo242 <alex@interchainlabs.io>
2025-06-04 17:34:20 +00:00

21 lines
475 B
Go

package client_test
import (
"context"
"testing"
abci "github.com/cometbft/cometbft/v2/abci/types"
"github.com/stretchr/testify/require"
"github.com/cosmos/cosmos-sdk/client"
)
func TestQueryABCICancellation(t *testing.T) {
cmdCtx, cancel := context.WithCancel(context.Background())
cancel()
ctx := client.Context{}.WithClient(client.MockClient{}).WithCmdContext(cmdCtx)
_, err := ctx.QueryABCI(abci.QueryRequest{})
require.ErrorIs(t, err, context.Canceled)
}