diff options
| author | Zhang Wei <zhangwei555@huawei.com> | 2016-01-28 22:19:25 +0800 |
|---|---|---|
| committer | Zhang Wei <zhangwei555@huawei.com> | 2016-01-29 23:39:07 +0800 |
| commit | 62a856e9129c9d5cf7db9ea6322c9073d68e3ea4 (patch) | |
| tree | 9a0c92b71028d0005f46a0aac76fe0b9fc0399ea /integration-cli/docker_cli_ps_test.go | |
| parent | 725b5b595b50bc73654817aac2b515bcb0c8b5b8 (diff) | |
| download | docker-62a856e9129c9d5cf7db9ea6322c9073d68e3ea4.tar.gz | |
Assert error in body of function `inspectField*`
1. Replace raw `docker inspect -f xxx` with `inspectField`, to make code
cleaner and more consistent
2. assert the error in function `inspectField*` so we don't need to
assert the return value of it every time, this will make inspect easier.
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Diffstat (limited to 'integration-cli/docker_cli_ps_test.go')
| -rw-r--r-- | integration-cli/docker_cli_ps_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/integration-cli/docker_cli_ps_test.go b/integration-cli/docker_cli_ps_test.go index 1c130fe83f..9089d60fdc 100644 --- a/integration-cli/docker_cli_ps_test.go +++ b/integration-cli/docker_cli_ps_test.go @@ -431,7 +431,7 @@ func (s *DockerSuite) TestPsRightTagName(c *check.C) { id2 = strings.TrimSpace(string(out)) var imageID string - out, _ = dockerCmd(c, "inspect", "-f", "{{.Id}}", "busybox") + out = inspectField(c, "busybox", "Id") imageID = strings.TrimSpace(string(out)) var id3 string |
