Use dockerCmdWithError now that it actually returns an error code.
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
| ... | ... |
@@ -54,7 +54,8 @@ func (s *DockerSuite) TestVolumeCliInspectMulti(c *check.C) {
|
| 54 | 54 |
dockerCmd(c, "volume", "create", "--name", "test1") |
| 55 | 55 |
dockerCmd(c, "volume", "create", "--name", "test2") |
| 56 | 56 |
|
| 57 |
- out, _ := dockerCmd(c, "volume", "inspect", "--format='{{ .Name }}'", "test1", "test2", "doesntexist")
|
|
| 57 |
+ out, _, err := dockerCmdWithError("volume", "inspect", "--format='{{ .Name }}'", "test1", "test2", "doesntexist")
|
|
| 58 |
+ c.Assert(err, checker.NotNil) |
|
| 58 | 59 |
outArr := strings.Split(strings.TrimSpace(out), "\n") |
| 59 | 60 |
c.Assert(len(outArr), check.Equals, 3, check.Commentf("\n%s", out))
|
| 60 | 61 |
|