1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

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

@ -41,11 +41,10 @@ func (s *DockerSuite) TestSaveAndLoadRepoStdout(c *check.C) {
deleteImages(repoName)
loadCmd := exec.Command(dockerBinary, "load")
loadCmd.Stdin = tmpFile
out, _, err := runCommandWithOutput(loadCmd)
c.Assert(err, check.IsNil, check.Commentf(out))
icmd.RunCmd(icmd.Cmd{
Command: []string{dockerBinary, "load"},
Stdin: tmpFile,
}).Assert(c, icmd.Success)
after := inspectField(c, repoName, "Id")
after = strings.TrimRight(after, "\n")
@ -67,7 +66,7 @@ func (s *DockerSuite) TestSaveAndLoadRepoStdout(c *check.C) {
n, err := pty.Read(buf)
c.Assert(err, check.IsNil) //could not read tty output
c.Assert(string(buf[:n]), checker.Contains, "Cowardly refusing", check.Commentf("help output is not being yielded", out))
c.Assert(string(buf[:n]), checker.Contains, "Cowardly refusing", check.Commentf("help output is not being yielded"))
}
func (s *DockerSuite) TestSaveAndLoadWithProgressBar(c *check.C) {