itest

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

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

func (p *ChantoolsProcess) ReadAvailableOutput(t *testing.T,
	timeout time.Duration) string

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.

Jump to

Keyboard shortcuts

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