mirror of
https://github.com/moby/moby.git
synced 2025-07-30 18:23:29 +03:00
Clean some runCommandWithOutput accross integration-cli code
There is still ways to go Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
@ -6,6 +6,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
icmd "github.com/docker/docker/pkg/testutil/cmd"
|
||||
"github.com/docker/docker/integration-cli/checker"
|
||||
"github.com/docker/docker/pkg/stringid"
|
||||
"github.com/go-check/check"
|
||||
@ -175,12 +176,11 @@ func (s *DockerSuite) TestRmiTagWithExistingContainers(c *check.C) {
|
||||
func (s *DockerSuite) TestRmiForceWithExistingContainers(c *check.C) {
|
||||
image := "busybox-clone"
|
||||
|
||||
cmd := exec.Command(dockerBinary, "build", "--no-cache", "-t", image, "-")
|
||||
cmd.Stdin = strings.NewReader(`FROM busybox
|
||||
icmd.RunCmd(icmd.Cmd{
|
||||
Command: []string{dockerBinary, "build", "--no-cache", "-t", image, "-"},
|
||||
Stdin: strings.NewReader(`FROM busybox
|
||||
MAINTAINER foo`)
|
||||
|
||||
out, _, err := runCommandWithOutput(cmd)
|
||||
c.Assert(err, checker.IsNil, check.Commentf("Could not build %s: %s", image, out))
|
||||
}).Assert(c, icmd.Success)
|
||||
|
||||
dockerCmd(c, "run", "--name", "test-force-rmi", image, "/bin/true")
|
||||
|
||||
|
Reference in New Issue
Block a user