cosmos-sdk/client/query_test.go
2025-08-29 15:58:04 -04:00

21 lines
472 B
Go

package client_test
import (
"context"
"testing"
abci "github.com/cometbft/cometbft/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.RequestQuery{})
require.ErrorIs(t, err, context.Canceled)
}