testutil

package
v0.0.2-rc0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecCreateGrant

func ExecCreateGrant(ctx context.Context, cctx client.Context, args ...string) (testutil.BufferWriter, error)

func ExecGovSubmitLegacyProposal

func ExecGovSubmitLegacyProposal(ctx context.Context, cctx client.Context, args ...string) (testutil.BufferWriter, error)

ExecGovSubmitLegacyProposal creates a tx for submit legacy proposal

func ExecSend

func ExecSend(ctx context.Context, cctx client.Context, args ...string) (testutil.BufferWriter, error)

func ExecTestCLICmd

func ExecTestCLICmd(ctx context.Context, cctx client.Context, cmd *cobra.Command, extraArgs ...string) (testutil.BufferWriter, error)

ExecTestCLICmd builds the client context, mocks the output and executes the command.

func GetTxFees

func GetTxFees(ctx context.Context, t testing.TB, cctx client.Context, data []byte) sdk.FeeTx

GetTxFees is a gentle response to inappropriate approach of cli test utils send transaction may fail and calling cli routine won't know about it

func MsgDeposit

func MsgDeposit(clientCtx client.Context, args ...string) (testutil.BufferWriter, error)

MsgDeposit deposits on a proposal

func MsgVote

func MsgVote(clientCtx client.Context, args ...string) (testutil.BufferWriter, error)

MsgVote votes for a proposal

func QueryBalancesExec

func QueryBalancesExec(ctx context.Context, cctx client.Context, args ...string) (testutil.BufferWriter, error)

func QueryBidExec

func QueryBidExec(ctx context.Context, cctx client.Context, extraArgs ...string) (sdktest.BufferWriter, error)

QueryBidExec is used for testing bid query

func QueryBidsExec

func QueryBidsExec(ctx context.Context, cctx client.Context, args ...string) (sdktest.BufferWriter, error)

QueryBidsExec is used for testing bids query

func QueryCertificateExec

func QueryCertificateExec(ctx context.Context, cctx client.Context, args ...string) (sdktest.BufferWriter, error)

QueryCertificateExec is used for testing certificate query

func QueryCertificatesExec

func QueryCertificatesExec(ctx context.Context, cctx client.Context, args ...string) (sdktest.BufferWriter, error)

QueryCertificatesExec is used for testing certificates query

func QueryDeploymentExec

func QueryDeploymentExec(ctx context.Context, cctx client.Context, extraArgs ...string) (sdktest.BufferWriter, error)

QueryDeploymentExec is used for testing deployment query

func QueryDeploymentsExec

func QueryDeploymentsExec(ctx context.Context, cctx client.Context, extraArgs ...string) (sdktest.BufferWriter, error)

QueryDeploymentsExec is used for testing deployments query

func QueryGroupExec

func QueryGroupExec(ctx context.Context, cctx client.Context, extraArgs ...string) (sdktest.BufferWriter, error)

QueryGroupExec is used for testing group query

func QueryLeaseExec

func QueryLeaseExec(ctx context.Context, cctx client.Context, extraArgs ...string) (sdktest.BufferWriter, error)

QueryLeaseExec is used for testing lease query

func QueryLeasesExec

func QueryLeasesExec(ctx context.Context, cctx client.Context, args ...string) (sdktest.BufferWriter, error)

QueryLeasesExec is used for testing leases query

func QueryOrderExec

func QueryOrderExec(ctx context.Context, cctx client.Context, extraArgs ...string) (sdktest.BufferWriter, error)

QueryOrderExec is used for testing order query

func QueryOrdersExec

func QueryOrdersExec(ctx context.Context, cctx client.Context, args ...string) (sdktest.BufferWriter, error)

QueryOrdersExec is used for testing orders query

func QueryProviderExec

func QueryProviderExec(ctx context.Context, cctx client.Context, extraArgs ...string) (sdktest.BufferWriter, error)

QueryProviderExec is used for testing provider query

func QueryProvidersExec

func QueryProvidersExec(ctx context.Context, cctx client.Context, args ...string) (sdktest.BufferWriter, error)

QueryProvidersExec is used for testing providers query

func TxAuxToFeeExec

func TxAuxToFeeExec(ctx context.Context, cctx client.Context, filename string, extraArgs ...string) (testutil.BufferWriter, error)

TxAuxToFeeExec executes `GetAuxToFeeCommand` cli command with given args.

func TxBroadcastExec

func TxBroadcastExec(ctx context.Context, cctx client.Context, args ...string) (testutil.BufferWriter, error)

func TxCloseBidExec

func TxCloseBidExec(ctx context.Context, cctx client.Context, extraArgs ...string) (sdktest.BufferWriter, error)

TxCloseBidExec is used for testing close bid tx

func TxCloseDeploymentExec

func TxCloseDeploymentExec(ctx context.Context, cctx client.Context, extraArgs ...string) (sdktest.BufferWriter, error)

TxCloseDeploymentExec is used for testing close deployment tx requires --dseq, --fees

func TxCloseGroupExec

func TxCloseGroupExec(ctx context.Context, cctx client.Context, extraArgs ...string) (sdktest.BufferWriter, error)

TxCloseGroupExec is used for testing close group tx

func TxCloseLeaseExec

func TxCloseLeaseExec(ctx context.Context, cctx client.Context, extraArgs ...string) (sdktest.BufferWriter, error)

TxCloseLeaseExec is used for testing close order tx

func TxCreateBidExec

func TxCreateBidExec(ctx context.Context, cctx client.Context, extraArgs ...string) (sdktest.BufferWriter, error)

TxCreateBidExec is used for testing create bid tx

func TxCreateDeploymentExec

func TxCreateDeploymentExec(ctx context.Context, cctx client.Context, filePath string, extraArgs ...string) (sdktest.BufferWriter, error)

TxCreateDeploymentExec is used for testing create deployment tx

func TxCreateLeaseExec

func TxCreateLeaseExec(ctx context.Context, cctx client.Context, extraArgs ...string) (sdktest.BufferWriter, error)

TxCreateLeaseExec is used for creating a lease

func TxCreateProviderExec

func TxCreateProviderExec(ctx context.Context, cctx client.Context, filepath string, extraArgs ...string) (sdktest.BufferWriter, error)

TxCreateProviderExec is used for testing create provider tx

func TxDecodeExec

func TxDecodeExec(ctx context.Context, cctx client.Context, encodedTx string, extraArgs ...string) (testutil.BufferWriter, error)

func TxDepositDeploymentExec

func TxDepositDeploymentExec(ctx context.Context, cctx client.Context, deposit sdk.Coin, extraArgs ...string) (sdktest.BufferWriter, error)

TxDepositDeploymentExec is used for testing deposit deployment tx

func TxEncodeExec

func TxEncodeExec(ctx context.Context, cctx client.Context, filename string, extraArgs ...string) (testutil.BufferWriter, error)

func TxGenerateClientExec

func TxGenerateClientExec(ctx context.Context, cctx client.Context, args ...string) (sdktest.BufferWriter, error)

TxGenerateClientExec is used for testing create client certificate tx

func TxGenerateServerExec

func TxGenerateServerExec(ctx context.Context, cctx client.Context, args ...string) (sdktest.BufferWriter, error)

TxGenerateServerExec is used for testing create server certificate tx

func TxGrantAuthorizationExec

func TxGrantAuthorizationExec(ctx context.Context, cctx client.Context, grantee sdk.AccAddress, extraArgs ...string) (sdktest.BufferWriter, error)

func TxMultiSignBatchExec

func TxMultiSignBatchExec(ctx context.Context, cctx client.Context, filename string, from string, sigFile1 string, sigFile2 string, extraArgs ...string) (testutil.BufferWriter, error)

func TxMultiSignExec

func TxMultiSignExec(ctx context.Context, cctx client.Context, args ...string) (testutil.BufferWriter, error)

func TxPublishClientExec

func TxPublishClientExec(ctx context.Context, cctx client.Context, args ...string) (sdktest.BufferWriter, error)

TxPublishClientExec is used for testing create client certificate tx

func TxPublishServerExec

func TxPublishServerExec(ctx context.Context, cctx client.Context, args ...string) (sdktest.BufferWriter, error)

TxPublishServerExec is used for testing create server certificate tx

func TxRevokeAuthorizationExec

func TxRevokeAuthorizationExec(ctx context.Context, cctx client.Context, grantee sdk.AccAddress, extraArgs ...string) (sdktest.BufferWriter, error)

func TxRevokeClientExec

func TxRevokeClientExec(ctx context.Context, cctx client.Context, args ...string) (sdktest.BufferWriter, error)

TxRevokeClientExec is used for testing create client certificate tx

func TxRevokeServerExec

func TxRevokeServerExec(ctx context.Context, cctx client.Context, args ...string) (sdktest.BufferWriter, error)

TxRevokeServerExec is used for testing create server certificate tx

func TxSignBatchExec

func TxSignBatchExec(ctx context.Context, cctx client.Context, args ...string) (testutil.BufferWriter, error)

func TxSignExec

func TxSignExec(ctx context.Context, cctx client.Context, args ...string) (testutil.BufferWriter, error)

func TxUpdateDeploymentExec

func TxUpdateDeploymentExec(ctx context.Context, cctx client.Context, filePath string, extraArgs ...string) (sdktest.BufferWriter, error)

TxUpdateDeploymentExec is used for testing update deployment tx

func TxUpdateProviderExec

func TxUpdateProviderExec(ctx context.Context, cctx client.Context, filepath string, extraArgs ...string) (sdktest.BufferWriter, error)

TxUpdateProviderExec is used for testing update provider tx

func TxValidateSignaturesExec

func TxValidateSignaturesExec(ctx context.Context, cctx client.Context, args ...string) (testutil.BufferWriter, error)

func ValidateTxSuccessful

func ValidateTxSuccessful(ctx context.Context, t testing.TB, cctx client.Context, data []byte) (*sdk.TxResponse, sdk.Tx)

ValidateTxSuccessful is a gentle response to inappropriate approach of cli test utils send transaction may fail and calling cli routine won't know about it

Types

type MockTendermintRPC

type MockTendermintRPC struct {
	rpcclientmock.Client
	// contains filtered or unexported fields
}

func NewMockTendermintRPC

func NewMockTendermintRPC(respQuery abci.ResponseQuery) MockTendermintRPC

NewMockTendermintRPC returns a mock TendermintRPC implementation. It is used for CLI testing.

func (MockTendermintRPC) ABCIQueryWithOptions

func (MockTendermintRPC) BroadcastTxSync

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL