Add dockerCmdWithError

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester 2015-07-14 08:35:06 +02:00
parent 5e331ad41a
commit 4290bdefab
1 changed files with 4 additions and 0 deletions

View File

@ -550,6 +550,10 @@ func pullImageIfNotExist(image string) (err error) {
return
}
func dockerCmdWithError(c *check.C, args ...string) (string, int, error) {
return runCommandWithOutput(exec.Command(dockerBinary, args...))
}
func dockerCmd(c *check.C, args ...string) (string, int) {
out, status, err := runCommandWithOutput(exec.Command(dockerBinary, args...))
c.Assert(err, check.IsNil, check.Commentf("%q failed with errors: %s, %v", strings.Join(args, " "), out, err))