Remove most of the runCommandWithOutput from integration tests

There is 5 calls left, that use StdinPipe that is not yet supported by
icmd.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester
2017-01-16 16:39:12 +01:00
parent 48dd90d398
commit ecbb0e62f6
15 changed files with 183 additions and 293 deletions

View File

@@ -422,7 +422,7 @@ func (s *DockerSuite) TestCpSpecialFiles(c *check.C) {
// Copy actual /etc/resolv.conf
dockerCmd(c, "cp", containerID+":/etc/resolv.conf", outDir)
expected, err := readContainerFile(containerID, "resolv.conf")
expected := readContainerFile(c, containerID, "resolv.conf")
actual, err := ioutil.ReadFile(outDir + "/resolv.conf")
// Expected copied file to be duplicate of the container resolvconf
@@ -431,7 +431,7 @@ func (s *DockerSuite) TestCpSpecialFiles(c *check.C) {
// Copy actual /etc/hosts
dockerCmd(c, "cp", containerID+":/etc/hosts", outDir)
expected, err = readContainerFile(containerID, "hosts")
expected = readContainerFile(c, containerID, "hosts")
actual, err = ioutil.ReadFile(outDir + "/hosts")
// Expected copied file to be duplicate of the container hosts
@@ -440,7 +440,7 @@ func (s *DockerSuite) TestCpSpecialFiles(c *check.C) {
// Copy actual /etc/resolv.conf
dockerCmd(c, "cp", containerID+":/etc/hostname", outDir)
expected, err = readContainerFile(containerID, "hostname")
expected = readContainerFile(c, containerID, "hostname")
actual, err = ioutil.ReadFile(outDir + "/hostname")
c.Assert(err, checker.IsNil)