Documentation ¶
Index ¶
- Constants
- Variables
- func AddFlags(cmd string, flags []string) string
- func ExecuteWrite(t *testing.T, cmdStr string, writes ...string) (exitSuccess bool)
- func ExecuteWriteCheckErr(t *testing.T, cmdStr string, writes ...string)
- func ExecuteWriteRetStdStreams(t *testing.T, cmdStr string, writes ...string) (bool, string, string)
- func MarshalStdTx(t require.TestingT, c *codec.Codec, stdTx auth.StdTx) []byte
- func UnmarshalStdTx(t require.TestingT, c *codec.Codec, s string) (stdTx auth.StdTx)
- type Fixtures
- func (f *Fixtures) AddGenesisAccount(address sdk.AccAddress, coins sdk.Coins, flags ...string)
- func (f *Fixtures) CLIConfig(key, value string, flags ...string)
- func (f *Fixtures) Cleanup(dirs ...string)
- func (f *Fixtures) CollectGenTxs(flags ...string)
- func (f *Fixtures) Flags() string
- func (f *Fixtures) GenTx(name string, flags ...string)
- func (f Fixtures) GenesisFile() string
- func (f Fixtures) GenesisState() simapp.GenesisState
- func (f *Fixtures) KeyAddress(name string) sdk.AccAddress
- func (f *Fixtures) KeysAdd(name string, flags ...string)
- func (f *Fixtures) KeysAddRecover(name, mnemonic string, flags ...string) (exitSuccess bool, stdout, stderr string)
- func (f *Fixtures) KeysAddRecoverHDPath(name, mnemonic string, account uint32, index uint32, flags ...string)
- func (f *Fixtures) KeysDelete(name string, flags ...string)
- func (f *Fixtures) KeysShow(name string, flags ...string) keyring.KeyOutput
- func (f *Fixtures) QueryTxs(page, limit int, events ...string) *sdk.SearchTxsResult
- func (f *Fixtures) SDInit(moniker string, flags ...string)
- func (f *Fixtures) SDStart(flags ...string) *tests.Process
- func (f *Fixtures) SDTendermint(query string) string
- func (f *Fixtures) UnsafeResetAll(flags ...string)
- func (f *Fixtures) ValidateGenesis()
Constants ¶
const ( Denom = "stake" KeyFoo = "foo" KeyBar = "bar" FooDenom = "footoken" FeeDenom = "feetoken" Fee2Denom = "fee2token" KeyBaz = "baz" KeyVesting = "vesting" KeyFooBarBaz = "foobarbaz" )
Variables ¶
var ( TotalCoins = sdk.NewCoins( sdk.NewCoin(Fee2Denom, sdk.TokensFromConsensusPower(2000000)), sdk.NewCoin(FeeDenom, sdk.TokensFromConsensusPower(2000000)), sdk.NewCoin(FooDenom, sdk.TokensFromConsensusPower(2000)), sdk.NewCoin(Denom, sdk.TokensFromConsensusPower(300).Add(sdk.NewInt(12))), ) StartCoins = sdk.NewCoins( sdk.NewCoin(Fee2Denom, sdk.TokensFromConsensusPower(1000000)), sdk.NewCoin(FeeDenom, sdk.TokensFromConsensusPower(1000000)), sdk.NewCoin(FooDenom, sdk.TokensFromConsensusPower(1000)), sdk.NewCoin(Denom, sdk.TokensFromConsensusPower(150)), ) VestingCoins = sdk.NewCoins( sdk.NewCoin(FeeDenom, sdk.TokensFromConsensusPower(500000)), ) )
Functions ¶
func ExecuteWrite ¶
func ExecuteWriteCheckErr ¶
Types ¶
type Fixtures ¶
type Fixtures struct { BuildDir string RootDir string SimdBinary string SimcliBinary string ChainID string RPCAddr string Port string SimdHome string SimcliHome string P2PAddr string Cdc *codec.Codec T *testing.T }
Fixtures is used to setup the testing environment
func InitFixtures ¶
InitFixtures is called at the beginning of a test and initializes a chain with 1 validator.
func NewFixtures ¶
NewFixtures creates a new instance of Fixtures with many vars set
func (*Fixtures) AddGenesisAccount ¶
AddGenesisAccount is simd add-genesis-account
func (*Fixtures) Cleanup ¶
Cleanup is meant to be run at the end of a test to clean up an remaining test state
func (*Fixtures) CollectGenTxs ¶
CollectGenTxs is simd collect-gentxs
func (Fixtures) GenesisFile ¶
GenesisFile returns the path of the genesis file
func (Fixtures) GenesisState ¶
func (f Fixtures) GenesisState() simapp.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) KeysAddRecover ¶
func (f *Fixtures) KeysAddRecover(name, mnemonic string, flags ...string) (exitSuccess bool, stdout, stderr string)
KeysAddRecover prepares simcli keys add --recover
func (*Fixtures) KeysAddRecoverHDPath ¶
func (f *Fixtures) KeysAddRecoverHDPath(name, mnemonic string, account uint32, index uint32, flags ...string)
KeysAddRecoverHDPath prepares simcli keys add --recover --account --index
func (*Fixtures) KeysDelete ¶
KeysDelete is simcli keys delete
func (*Fixtures) QueryTxs ¶
func (f *Fixtures) QueryTxs(page, limit int, events ...string) *sdk.SearchTxsResult
QueryTxs is simcli query txs
func (*Fixtures) SDInit ¶
SDInit is simd init NOTE: SDInit sets the ChainID for the Fixtures instance
func (*Fixtures) SDTendermint ¶
SDTendermint returns the results of simd tendermint [query]
func (*Fixtures) UnsafeResetAll ¶
UnsafeResetAll is simd unsafe-reset-all
func (*Fixtures) ValidateGenesis ¶
func (f *Fixtures) ValidateGenesis()
ValidateGenesis runs simd validate-genesis