Documentation ¶
Index ¶
- type AsyncCommandWrapper
- func (c *AsyncCommandWrapper) AssertStillRunning()
- func (c *AsyncCommandWrapper) AssertSuccessfullyRan()
- func (c *AsyncCommandWrapper) Error() error
- func (c *AsyncCommandWrapper) PrintOutput()
- func (c *AsyncCommandWrapper) RunAsync()
- func (c *AsyncCommandWrapper) StopAsync()
- func (c *AsyncCommandWrapper) Successful() bool
- type CommandWrapper
- func (c *CommandWrapper) GetOutput() string
- func (c *CommandWrapper) LoginAndAssertFailure(username, password string)
- func (c *CommandWrapper) LoginAndAssertSuccess(username, password string)
- func (c *CommandWrapper) PrintOutput()
- func (c *CommandWrapper) Run()
- func (c *CommandWrapper) RunAndAssertFailure()
- func (c *CommandWrapper) RunAndAssertSuccess()
- func (c *CommandWrapper) Successful() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AsyncCommandWrapper ¶
type AsyncCommandWrapper struct { Cmd *exec.Cmd sync.Mutex // contains filtered or unexported fields }
AsyncCommandWrapper wraps an OS process to be ran asynchronously
func (*AsyncCommandWrapper) AssertStillRunning ¶
func (c *AsyncCommandWrapper) AssertStillRunning()
AssertStillRunning checks for the command to still be running. Succeeds if it is running.
func (*AsyncCommandWrapper) AssertSuccessfullyRan ¶
func (c *AsyncCommandWrapper) AssertSuccessfullyRan()
AssertSuccessfullyRan checks for the command to have finished and asserts success. Succeeds if no errors occurred.
func (*AsyncCommandWrapper) Error ¶
func (c *AsyncCommandWrapper) Error() error
Error returns the error for the command if one exists.
func (*AsyncCommandWrapper) PrintOutput ¶
func (c *AsyncCommandWrapper) PrintOutput()
PrintOutput prints the command's output to standard out.
func (*AsyncCommandWrapper) RunAsync ¶
func (c *AsyncCommandWrapper) RunAsync()
RunAsync starts the wrapped command on a new goroutine and waits for it to finish. The goroutine will finish if the process comes to a stop, or the StopAsync() method is called
func (*AsyncCommandWrapper) StopAsync ¶
func (c *AsyncCommandWrapper) StopAsync()
StopAsync signals the command to stop and waits for it to finish.
func (*AsyncCommandWrapper) Successful ¶
func (c *AsyncCommandWrapper) Successful() bool
Successful returns true if the command dos not have an error.
type CommandWrapper ¶
CommandWrapper wraps an OS process to be ran synchronously.
func (*CommandWrapper) GetOutput ¶
func (c *CommandWrapper) GetOutput() string
GetOutput returns the stdout and stderr of the command.
func (*CommandWrapper) LoginAndAssertFailure ¶
func (c *CommandWrapper) LoginAndAssertFailure(username, password string)
LoginAndAssertFailure provides the username and password to stdin and runs the command and asserts failure. Succeeds if the command finished with a failure.
func (*CommandWrapper) LoginAndAssertSuccess ¶
func (c *CommandWrapper) LoginAndAssertSuccess(username, password string)
LoginAndAssertSuccess provides the username and password to stdin and runs the command and asserts success. Succeeds if the command finished successfully.
func (*CommandWrapper) PrintOutput ¶
func (c *CommandWrapper) PrintOutput()
PrintOutput prints the output of the command to standard output.
func (*CommandWrapper) Run ¶
func (c *CommandWrapper) Run()
Run runs the wrapped command without checking its result.
func (*CommandWrapper) RunAndAssertFailure ¶
func (c *CommandWrapper) RunAndAssertFailure()
RunAndAssertFailure runs the wrapped command and asserts failure. Succeeds if the command finished with a failure.
func (*CommandWrapper) RunAndAssertSuccess ¶
func (c *CommandWrapper) RunAndAssertSuccess()
RunAndAssertSuccess runs the wrapped command and asserts success. Succeeds and prints the command's output if the command finished successfully.
func (*CommandWrapper) Successful ¶
func (c *CommandWrapper) Successful() bool
Successful returns true if the command dos not have an error.