Documentation
¶
Index ¶
- type CmdSource
- type CommandBuilder
- type Config
- type Engine
- func NewEngine(binary string) (*Engine, error)
- func NewEngineFromSlice(cmdParts []string) *Engine
- func NewEngineFromSliceWithConfig(cmdParts []string, config Config) *Engine
- func NewEngineFromSliceWithOptions(cmdParts []string, options Options) *Engine
- func NewEngineWithConfig(binary string, config Config) (*Engine, error)
- func NewEngineWithOptions(binary string, options Options) *Engine
- func (e *Engine) GetStderr() string
- func (e *Engine) GetStdout() string
- func (e *Engine) Run(t *testing.T, command ...CmdSource) error
- func (e *Engine) RunAndCapture(t *testing.T, command ...CmdSource) (string, error)
- func (e *Engine) RunBackground(t *testing.T, command ...CmdSource) error
- func (e *Engine) SetFailOnError(failOnError bool)
- func (e *Engine) Stop(t *testing.T) error
- func (e *Engine) StopWithError() error
- type ErrorHandler
- type Logger
- type Options
- type OutputCapture
- type ProcessManager
- type SliceCmd
- type StringCmd
- type TestLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandBuilder ¶ added in v0.1.57
type CommandBuilder struct {
// contains filtered or unexported fields
}
func NewCommandBuilder ¶ added in v0.1.57
func NewCommandBuilder(binary string, config Config) (*CommandBuilder, error)
func NewCommandBuilderFromSlice ¶ added in v0.1.57
func NewCommandBuilderFromSlice(cmdParts []string, config Config) *CommandBuilder
func (*CommandBuilder) BuildCommand ¶ added in v0.1.57
func (cb *CommandBuilder) BuildCommand(sources ...CmdSource) ([]string, string, error)
type Config ¶ added in v0.1.57
func DefaultConfig ¶ added in v0.1.57
func DefaultConfig() Config
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func NewEngineFromSlice ¶ added in v0.1.57
func NewEngineFromSliceWithConfig ¶ added in v0.1.57
func NewEngineWithConfig ¶ added in v0.1.57
func NewEngineWithOptions ¶
Legacy constructor functions for backward compatibility
func (*Engine) RunAndCapture ¶
func (*Engine) RunBackground ¶
func (*Engine) SetFailOnError ¶
func (*Engine) StopWithError ¶
type ErrorHandler ¶ added in v0.1.57
type ErrorHandler struct {
// contains filtered or unexported fields
}
func NewErrorHandler ¶ added in v0.1.57
func NewErrorHandler(config Config, logger Logger) *ErrorHandler
func (*ErrorHandler) HandleError ¶ added in v0.1.57
func (eh *ErrorHandler) HandleError(fullCmd []string, output *OutputCapture, err error) error
type Options ¶
func DefaultEngineOptions ¶
func DefaultEngineOptions() Options
type OutputCapture ¶ added in v0.1.57
type OutputCapture struct {
// contains filtered or unexported fields
}
func NewOutputCapture ¶ added in v0.1.57
func NewOutputCapture() *OutputCapture
func (*OutputCapture) CreateWriters ¶ added in v0.1.57
func (*OutputCapture) GetStderr ¶ added in v0.1.57
func (oc *OutputCapture) GetStderr() string
func (*OutputCapture) GetStdout ¶ added in v0.1.57
func (oc *OutputCapture) GetStdout() string
func (*OutputCapture) Reset ¶ added in v0.1.57
func (oc *OutputCapture) Reset()
type ProcessManager ¶ added in v0.1.57
type ProcessManager struct {
// contains filtered or unexported fields
}
func NewProcessManager ¶ added in v0.1.57
func NewProcessManager(config Config, logger Logger) *ProcessManager
func (*ProcessManager) IsRunning ¶ added in v0.1.57
func (pm *ProcessManager) IsRunning() bool
func (*ProcessManager) Start ¶ added in v0.1.57
func (pm *ProcessManager) Start(cmd *exec.Cmd) error
func (*ProcessManager) Stop ¶ added in v0.1.57
func (pm *ProcessManager) Stop() error
func (*ProcessManager) StopWithoutLogging ¶ added in v0.1.57
func (pm *ProcessManager) StopWithoutLogging() error
type TestLogger ¶ added in v0.1.57
type TestLogger struct {
// contains filtered or unexported fields
}
func NewTestLogger ¶ added in v0.1.57
func NewTestLogger(t *testing.T) *TestLogger
func (*TestLogger) Errorf ¶ added in v0.1.57
func (tl *TestLogger) Errorf(format string, args ...interface{})
func (*TestLogger) Fatalf ¶ added in v0.1.57
func (tl *TestLogger) Fatalf(format string, args ...interface{})
func (*TestLogger) Logf ¶ added in v0.1.57
func (tl *TestLogger) Logf(format string, args ...interface{})
Click to show internal directories.
Click to hide internal directories.