Documentation
¶
Index ¶
Constants ¶
const ( // When this environ var is set to a value and running tests with -v flag, // then Runner output is logged. EnvTestRunnerOutput = "TEST_RUNNER_OUTPUT" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CmdArgs ¶
type CmdArgs struct {
// contains filtered or unexported fields
}
CmdArgs contains a command name and any arguments.
type Runner ¶
Runner is a helper for running the indexer and other commands. Runner is not specifically tied to the indexer, but is designed to be used to manage multiple processes in a test; and is therefore useful for testing the indexer, the dhstore, and providers, all in a temporary directory and with a test environment.
func NewRunner ¶
NewRunner creates a new Runner for the given test, context, and temporary directory. It also takes a list of StdoutWatchers, which will be used to watch for specific output from the commands.
func (*Runner) Run ¶
Run runs a command and returns its output. This is useful for executing synchronous commands within the temporary environment.
type StdoutWatcher ¶
type StdoutWatcher struct {
// contains filtered or unexported fields
}
StdoutWatcher is a helper for watching the stdout of a command for a specific string. It is used by Runner to watch for specific output from the commands. The Signal channel is signaled when the match string is found.
func NewStdoutWatcher ¶
func NewStdoutWatcher(match string) StdoutWatcher