Back to godoc.org

Package clitest

v0.33.0-pool
Latest Go to latest

The latest major version is .

Published: Apr 18, 2019 | License: Apache-2.0 | Module: git.ethfans.org/weishuyu/cosmos-for-pool.git

Index

func WriteToNewTempFile

func WriteToNewTempFile(t *testing.T, s string) *os.File

Write the given string to a new temporary file

type Fixtures

type Fixtures struct {
	ChainID  string
	RPCAddr  string
	Port     string
	GDHome   string
	GCLIHome string
	P2PAddr  string
	T        *testing.T
}

Fixtures is used to setup the testing environment

func InitFixtures

func InitFixtures(t *testing.T) (f *Fixtures)

InitFixtures is called at the beginning of a test and initializes a chain with 1 validator

func NewFixtures

func NewFixtures(t *testing.T) *Fixtures

NewFixtures creates a new instance of Fixtures with many vars set

func (*Fixtures) AddGenesisAccount

func (f *Fixtures) AddGenesisAccount(address sdk.AccAddress, coins sdk.Coins, flags ...string)

AddGenesisAccount is gaiad add-genesis-account

func (*Fixtures) CLIConfig

func (f *Fixtures) CLIConfig(key, value string, flags ...string)

CLIConfig is gaiacli config

func (*Fixtures) Cleanup

func (f *Fixtures) Cleanup(dirs ...string)

Cleanup is meant to be run at the end of a test to clean up an remaining test state

func (*Fixtures) CollectGenTxs

func (f *Fixtures) CollectGenTxs(flags ...string)

CollectGenTxs is gaiad collect-gentxs

func (*Fixtures) Flags

func (f *Fixtures) Flags() string

Flags returns the flags necessary for making most CLI calls

func (*Fixtures) GDInit

func (f *Fixtures) GDInit(moniker string, flags ...string)

GDInit is gaiad init NOTE: GDInit sets the ChainID for the Fixtures instance

func (*Fixtures) GDStart

func (f *Fixtures) GDStart(flags ...string) *tests.Process

GDStart runs gaiad start with the appropriate flags and returns a process

func (*Fixtures) GDTendermint

func (f *Fixtures) GDTendermint(query string) string

GDTendermint returns the results of gaiad tendermint [query]

func (*Fixtures) GenTx

func (f *Fixtures) GenTx(name string, flags ...string)

GenTx is gaiad gentx

func (Fixtures) GenesisFile

func (f Fixtures) GenesisFile() string

GenesisFile returns the path of the genesis file

func (Fixtures) GenesisState

func (f Fixtures) GenesisState() app.GenesisState

GenesisFile returns the application's genesis state

func (*Fixtures) KeyAddress

func (f *Fixtures) KeyAddress(name string) sdk.AccAddress

KeyAddress returns the SDK account address from the key

func (*Fixtures) KeysAdd

func (f *Fixtures) KeysAdd(name string, flags ...string)

KeysAdd is gaiacli keys add

func (*Fixtures) KeysAddRecover

func (f *Fixtures) KeysAddRecover(name, mnemonic string, flags ...string)

KeysAddRecover prepares gaiacli keys add --recover

func (*Fixtures) KeysAddRecoverHDPath

func (f *Fixtures) KeysAddRecoverHDPath(name, mnemonic string, account uint32, index uint32, flags ...string)

KeysAddRecoverHDPath prepares gaiacli keys add --recover --account --index

func (*Fixtures) KeysDelete

func (f *Fixtures) KeysDelete(name string, flags ...string)

KeysDelete is gaiacli keys delete

func (*Fixtures) KeysShow

func (f *Fixtures) KeysShow(name string, flags ...string) keys.KeyOutput

KeysShow is gaiacli keys show

func (*Fixtures) QueryAccount

func (f *Fixtures) QueryAccount(address sdk.AccAddress, flags ...string) auth.BaseAccount

QueryAccount is gaiacli query account

func (*Fixtures) QueryGovDeposit

func (f *Fixtures) QueryGovDeposit(proposalID int, depositor sdk.AccAddress, flags ...string) gov.Deposit

QueryGovDeposit is gaiacli query gov deposit

func (*Fixtures) QueryGovDeposits

func (f *Fixtures) QueryGovDeposits(propsalID int, flags ...string) []gov.Deposit

QueryGovDeposits is gaiacli query gov deposits

func (*Fixtures) QueryGovParamDeposit

func (f *Fixtures) QueryGovParamDeposit() gov.DepositParams

QueryGovParamDeposit is gaiacli query gov param deposit

func (*Fixtures) QueryGovParamTallying

func (f *Fixtures) QueryGovParamTallying() gov.TallyParams

QueryGovParamTallying is gaiacli query gov param tallying

func (*Fixtures) QueryGovParamVoting

func (f *Fixtures) QueryGovParamVoting() gov.VotingParams

QueryGovParamVoting is gaiacli query gov param voting

func (*Fixtures) QueryGovProposal

func (f *Fixtures) QueryGovProposal(proposalID int, flags ...string) gov.Proposal

QueryGovProposal is gaiacli query gov proposal

func (*Fixtures) QueryGovProposals

func (f *Fixtures) QueryGovProposals(flags ...string) gov.Proposals

QueryGovProposals is gaiacli query gov proposals

func (*Fixtures) QueryGovVote

func (f *Fixtures) QueryGovVote(proposalID int, voter sdk.AccAddress, flags ...string) gov.Vote

QueryGovVote is gaiacli query gov vote

func (*Fixtures) QueryGovVotes

func (f *Fixtures) QueryGovVotes(proposalID int, flags ...string) []gov.Vote

QueryGovVotes is gaiacli query gov votes

func (*Fixtures) QuerySigningInfo

func (f *Fixtures) QuerySigningInfo(val string) slashing.ValidatorSigningInfo

QuerySigningInfo returns the signing info for a validator

func (*Fixtures) QuerySlashingParams

func (f *Fixtures) QuerySlashingParams() slashing.Params

QuerySlashingParams is gaiacli query slashing params

func (*Fixtures) QueryStakingDelegationsTo

func (f *Fixtures) QueryStakingDelegationsTo(valAddr sdk.ValAddress, flags ...string) []staking.Delegation

QueryStakingDelegationsTo is gaiacli query staking delegations-to

func (*Fixtures) QueryStakingParameters

func (f *Fixtures) QueryStakingParameters(flags ...string) staking.Params

QueryStakingParameters is gaiacli query staking parameters

func (*Fixtures) QueryStakingPool

func (f *Fixtures) QueryStakingPool(flags ...string) staking.Pool

QueryStakingPool is gaiacli query staking pool

func (*Fixtures) QueryStakingUnbondingDelegationsFrom

func (f *Fixtures) QueryStakingUnbondingDelegationsFrom(valAddr sdk.ValAddress, flags ...string) []staking.UnbondingDelegation

QueryStakingUnbondingDelegationsFrom is gaiacli query staking unbonding-delegations-from

func (*Fixtures) QueryStakingValidator

func (f *Fixtures) QueryStakingValidator(valAddr sdk.ValAddress, flags ...string) staking.Validator

QueryStakingValidator is gaiacli query staking validator

func (*Fixtures) QueryTxs

func (f *Fixtures) QueryTxs(page, limit int, tags ...string) []sdk.TxResponse

QueryTxs is gaiacli query txs

func (*Fixtures) QueryTxsInvalid

func (f *Fixtures) QueryTxsInvalid(expectedErr error, page, limit int, tags ...string)

QueryTxsInvalid query txs with wrong parameters and compare expected error

func (*Fixtures) TxBroadcast

func (f *Fixtures) TxBroadcast(fileName string, flags ...string) (bool, string, string)

TxBroadcast is gaiacli tx broadcast

func (*Fixtures) TxEncode

func (f *Fixtures) TxEncode(fileName string, flags ...string) (bool, string, string)

TxEncode is gaiacli tx encode

func (*Fixtures) TxGovDeposit

func (f *Fixtures) TxGovDeposit(proposalID int, from string, amount sdk.Coin, flags ...string) (bool, string, string)

TxGovDeposit is gaiacli tx gov deposit

func (*Fixtures) TxGovSubmitProposal

func (f *Fixtures) TxGovSubmitProposal(from, typ, title, description string, deposit sdk.Coin, flags ...string) (bool, string, string)

TxGovSubmitProposal is gaiacli tx gov submit-proposal

func (*Fixtures) TxGovVote

func (f *Fixtures) TxGovVote(proposalID int, option gov.VoteOption, from string, flags ...string) (bool, string, string)

TxGovVote is gaiacli tx gov vote

func (*Fixtures) TxMultisign

func (f *Fixtures) TxMultisign(fileName, name string, signaturesFiles []string,
	flags ...string) (bool, string, string)

TxMultisign is gaiacli tx multisign

func (*Fixtures) TxSend

func (f *Fixtures) TxSend(from string, to sdk.AccAddress, amount sdk.Coin, flags ...string) (bool, string, string)

TxSend is gaiacli tx send

func (*Fixtures) TxSign

func (f *Fixtures) TxSign(signer, fileName string, flags ...string) (bool, string, string)

TxSign is gaiacli tx sign

func (*Fixtures) TxStakingCreateValidator

func (f *Fixtures) TxStakingCreateValidator(from, consPubKey string, amount sdk.Coin, flags ...string) (bool, string, string)

TxStakingCreateValidator is gaiacli tx staking create-validator

func (*Fixtures) TxStakingUnbond

func (f *Fixtures) TxStakingUnbond(from, shares string, validator sdk.ValAddress, flags ...string) bool

TxStakingUnbond is gaiacli tx staking unbond

func (*Fixtures) UnsafeResetAll

func (f *Fixtures) UnsafeResetAll(flags ...string)

UnsafeResetAll is gaiad unsafe-reset-all

func (*Fixtures) ValidateGenesis

func (f *Fixtures) ValidateGenesis()

ValidateGenesis runs gaiad validate-genesis

Package Files

  • doc.go
  • test_helpers.go
Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier