mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05: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:
parent
766e53d8cb
commit
87e3fcfe1e
19 changed files with 433 additions and 578 deletions
|
@ -16,6 +16,7 @@ import (
|
|||
|
||||
"github.com/docker/docker/integration-cli/checker"
|
||||
"github.com/docker/docker/pkg/testutil"
|
||||
icmd "github.com/docker/docker/pkg/testutil/cmd"
|
||||
"github.com/docker/go-units"
|
||||
"github.com/go-check/check"
|
||||
)
|
||||
|
@ -100,12 +101,10 @@ func (s *DockerSuite) TestBuildAddChangeOwnership(c *check.C) {
|
|||
}
|
||||
defer testFile.Close()
|
||||
|
||||
chownCmd := exec.Command("chown", "daemon:daemon", "foo")
|
||||
chownCmd.Dir = tmpDir
|
||||
out, _, err := runCommandWithOutput(chownCmd)
|
||||
if err != nil {
|
||||
c.Fatal(err, out)
|
||||
}
|
||||
icmd.RunCmd(icmd.Cmd{
|
||||
Command: []string{"chown", "daemon:daemon", "foo"},
|
||||
Dir: tmpDir,
|
||||
}).Assert(c, icmd.Success)
|
||||
|
||||
if err := ioutil.WriteFile(filepath.Join(tmpDir, "Dockerfile"), []byte(dockerfile), 0644); err != nil {
|
||||
c.Fatalf("failed to open destination dockerfile: %v", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue