Skip to content

Commit

Permalink
Add dockerCmdWithStdoutStderr function
Browse files Browse the repository at this point in the history
Signed-off-by: Lei Jitang <[email protected]>
  • Loading branch information
coolljt0725 committed Jul 18, 2015
1 parent cd64297 commit c6cde91
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions integration-cli/docker_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,12 @@ func dockerCmdWithError(c *check.C, args ...string) (string, int, error) {
return runCommandWithOutput(exec.Command(dockerBinary, args...))
}

func dockerCmdWithStdoutStderr(c *check.C, args ...string) (string, string, int) {
stdout, stderr, status, err := runCommandWithStdoutStderr(exec.Command(dockerBinary, args...))
c.Assert(err, check.IsNil, check.Commentf("%q failed with errors: %s, %v", strings.Join(args, " "), stderr, err))
return stdout, stderr, status
}

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))
Expand Down

0 comments on commit c6cde91

Please sign in to comment.