From a95d0e254d3208753522ff831b9dea2ecdb9cafb Mon Sep 17 00:00:00 2001 From: Vincent Demeester Date: Tue, 14 Jul 2015 08:35:06 +0200 Subject: [PATCH] Add dockerCmdWithError Signed-off-by: Vincent Demeester Upstream-commit: 4290bdefabc46d6faada968ef7ddba1d3c21dcca Component: engine --- components/engine/integration-cli/docker_utils.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/engine/integration-cli/docker_utils.go b/components/engine/integration-cli/docker_utils.go index 964ef2d4d9..70831cf073 100644 --- a/components/engine/integration-cli/docker_utils.go +++ b/components/engine/integration-cli/docker_utils.go @@ -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))