Documentation
¶
Index ¶
- Variables
- func Clean()
- func ExecuteT(t *testing.T, cmd string) (out string)
- func InitServerForTest(t *testing.T)
- func StartLCDServerForTest(t *testing.T, home, chainID string) (cmd *exec.Cmd, port string)
- func StartNodeServerForTest(t *testing.T, home string) *exec.Cmd
- func StartServer() error
- func TestInitBasecoin(t *testing.T, home string) string
- func WaitForHeight(height int64, port string)
- func WaitForHeightTM(height int64, port string)
- func WaitForNextHeightTM(port string)
- func WaitForRPC(laddr string)
- func WaitForStart(port string)
- type Process
Constants ¶
This section is empty.
Variables ¶
var (
ACCOUNTS = []string{"alice", "bob", "charlie", "igor"}
)
nolint
Functions ¶
func StartLCDServerForTest ¶ added in v0.2.0
expects TestInitBaseCoin to have been run
func StartNodeServerForTest ¶ added in v0.2.0
expects TestInitBaseCoin to have been run
func StartServer ¶ added in v0.2.0
func StartServer() error
expects TestInitBaseCoin to have been run
func TestInitBasecoin ¶ added in v0.2.0
Init Basecoin Test
func WaitForHeight ¶
Wait for height from the LCD API on localhost
func WaitForHeightTM ¶
Wait for the given height from the Tendermint RPC on localhost
func WaitForNextHeightTM ¶
func WaitForNextHeightTM(port string)
Wait for the next tendermint block from the Tendermint RPC on localhost
Types ¶
type Process ¶
type Process struct { ExecPath string Args []string Pid int StartTime time.Time EndTime time.Time Cmd *exec.Cmd `json:"-"` ExitState *os.ProcessState `json:"-"` WaitCh chan struct{} `json:"-"` StdinPipe io.WriteCloser `json:"-"` StdoutBuffer *bytes.Buffer `json:"-"` StderrBuffer *bytes.Buffer `json:"-"` }
execution process
func GoExecuteT ¶
Execute the command, launch goroutines to log stdout/err to t. Caller should wait for .Wait() or .Stop() to terminate.
func StartProcess ¶
func StartProcess(dir string, name string, args []string, outFile, errFile io.WriteCloser) (*Process, error)
dir: The working directory. If "", os.Getwd() is used. name: Command name args: Args to command. (should not include name) outFile, errFile: If not nil, will use, otherwise new Buffers will be allocated. Either way, Process.Cmd.StdoutPipe and Process.Cmd.StderrPipe will be nil respectively.