integration

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Overview

Package integration contains integration test utils.

Index

Constants

View Source
const (
	// AnomDenom is anom name .
	AnomDenom = "anom"

	// ChainName is default test chain name.
	ChainName = "chain-1"
	// ChainFlag is default chain flag.
	ChainFlag = "--chain-id=" + ChainName
	// KeyRingFlag is default keyring flag.
	KeyRingFlag = "--keyring-backend=test"

	// ChainDenom is default chain denom.
	ChainDenom = AnomDenom
	// MinGlobalSelfDelegation is the value for app_state.staking.params.min_global_self_delegation.
	MinGlobalSelfDelegation = "250000000000000000000000" // 250k noms
	// MinSelfDelegationFlag is the generic min-self-delegation for a validator.
	MinSelfDelegationFlag = "--min-self-delegation=" + MinGlobalSelfDelegation
	// ValidatorGenesysAmount is default validator genesys amount.
	ValidatorGenesysAmount = "1000000000000000000000000" + ChainDenom // 1m noms
	// TestChainValidatorStakeAmount is default validator genesys stake amount.
	TestChainValidatorStakeAmount = MinGlobalSelfDelegation + ChainDenom
	// TestChainValidator1Name is default validator name.
	TestChainValidator1Name = "validator1"

	// OnomyGrpcHost is default host.
	OnomyGrpcHost = "127.0.0.1"
	// OnomyGrpcPort is default port.
	OnomyGrpcPort = "9090"
)

Variables

This section is empty.

Functions

func ExecuteChainCmd

func ExecuteChainCmd(cmd string, args ...string) string

ExecuteChainCmd executes any cmd on the onomyd cli.

Types

type OnomyChain

type OnomyChain struct {
	Validator keyring.KeyOutput
	// contains filtered or unexported fields
}

OnomyChain is test struct for the chain running.

func NewOnomyChain

func NewOnomyChain() (*OnomyChain, error)

NewOnomyChain creates a new OnomyChain.

func (*OnomyChain) GetAccountBalance

func (oc *OnomyChain) GetAccountBalance(address string) ([]sdkTypes.Coin, error)

GetAccountBalance return the 'address' balance.

func (*OnomyChain) Start

func (oc *OnomyChain) Start(timeout time.Duration) error

Start start the OnomyChain.

func (*OnomyChain) Stop

func (oc *OnomyChain) Stop()

Stop stops the OnomyChain.

Jump to

Keyboard shortcuts

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