Documentation ¶
Index ¶
- func Execute(cmdLine string, args ...interface{}) (string, error)
- func Retry(command model.Cmd, expectedResult string, timeout int) bool
- func RetryUntilResult(command model.Cmd, expectedCmdResult model.CmdResult, ...) bool
- func Start(cmdLine string, user *model.User, args ...interface{}) (*gexec.Session, error)
- func StartCmd(command model.Cmd) (*gexec.Session, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
Execute executes the command generated by fmt.Sprintf(cmdLine, args...) and returns its output.
func Retry ¶
Retry runs the provided <cmd> repeatedly, once a second up to the supplied <timeout> until the <cmd> result contains the <expectedResult> An example use of this utility would be curl-ing a url and waiting until the response code matches the expected response. TODO: https://github.com/deiscc/workflow-e2e/issues/240
func RetryUntilResult ¶
func RetryUntilResult(command model.Cmd, expectedCmdResult model.CmdResult, period, timeout time.Duration) bool
RetryUntilResult runs the provided cmd repeatedly, once every period, up to the supplied timeout until the cmd result matches the supplied expectedCmdResult
func Start ¶
Start executes the provided command (often a `deis` command of some sort) as the specified user (by selecting the corresponding profile). Optional arguments may also be supplied that will be substituted into the provided command using fmt.Sprintf(...).
Types ¶
This section is empty.