cmd

package
v2.12.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2017 License: MIT Imports: 11 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(cmdLine string, args ...interface{}) (string, error)

Execute executes the command generated by fmt.Sprintf(cmdLine, args...) and returns its output.

func Retry

func Retry(command model.Cmd, expectedResult string, timeout int) bool

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/deis/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

func Start(cmdLine string, user *model.User, args ...interface{}) (*gexec.Session, error)

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(...).

func StartCmd

func StartCmd(command model.Cmd) (*gexec.Session, error)

StartCmd executes the provided model.Command. It is used primarily by the Start function (above), but is also used directly in scenarios where tests must execute fine-grained control over the environment in which the command will be executed.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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