Documentation
¶
Index ¶
- type ChantoolsProcess
- func (p *ChantoolsProcess) Kill(t *testing.T)
- func (p *ChantoolsProcess) ReadAllOutput(t *testing.T) string
- func (p *ChantoolsProcess) ReadAvailableOutput(t *testing.T, timeout time.Duration) string
- func (p *ChantoolsProcess) ReadOutputUntil(t *testing.T, substr string, timeout time.Duration) string
- func (p *ChantoolsProcess) Wait(t *testing.T)
- func (p *ChantoolsProcess) WriteInput(t *testing.T, input string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChantoolsProcess ¶
type ChantoolsProcess struct {
// contains filtered or unexported fields
}
ChantoolsProcess wraps a running chantools process for integration testing.
func StartChantools ¶
func StartChantools(t *testing.T, args ...string) *ChantoolsProcess
StartChantools starts the chantools binary with the given arguments.
func (*ChantoolsProcess) Kill ¶
func (p *ChantoolsProcess) Kill(t *testing.T)
Kill kills the process.
func (*ChantoolsProcess) ReadAllOutput ¶
func (p *ChantoolsProcess) ReadAllOutput(t *testing.T) string
ReadAllOutput reads all output from the process's stdout until EOF.
func (*ChantoolsProcess) ReadAvailableOutput ¶
ReadAvailableOutput reads as many bytes as possible from stdout until the timeout elapses.
func (*ChantoolsProcess) ReadOutputUntil ¶
func (p *ChantoolsProcess) ReadOutputUntil(t *testing.T, substr string, timeout time.Duration) string
ReadOutputUntil reads from stdout until the given substring is found or timeout.
func (*ChantoolsProcess) Wait ¶
func (p *ChantoolsProcess) Wait(t *testing.T)
Wait waits for the process to exit.
func (*ChantoolsProcess) WriteInput ¶
func (p *ChantoolsProcess) WriteInput(t *testing.T, input string)
WriteInput writes input to the process's stdin.
Click to show internal directories.
Click to hide internal directories.