Change to use c.Assert() instead of result.Assert()

Fix delete containers and make sure it prints errors correctly.
Rename Result.Fails to Result.Assert()
Create a constant for the default expected.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 243885808f5c69143679d094d964d333c47e69bf
Component: engine
This commit is contained in:
Daniel Nephin
2016-08-16 17:51:38 -04:00
parent eaa727c6e2
commit 0d4234bb46
14 changed files with 86 additions and 47 deletions

View File

@ -910,7 +910,7 @@ func (s *DockerDaemonSuite) TestDaemonDefaultNetworkInvalidClusterConfig(c *chec
// Start daemon with docker0 bridge
result := icmd.RunCommand("ifconfig", defaultNetworkBridge)
result.Assert(c, icmd.Expected{})
c.Assert(result, icmd.Matches, icmd.Success)
err = d.Restart(fmt.Sprintf("--cluster-store=%s", discoveryBackend))
c.Assert(err, checker.IsNil)
@ -2251,7 +2251,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartWithUnpausedRunningContainer(t *che
ctrBinary,
"--address", "unix:///var/run/docker/libcontainerd/docker-containerd.sock",
"containers", "resume", cid)
result.Assert(t, icmd.Expected{})
t.Assert(result, icmd.Matches, icmd.Success)
// Give time to containerd to process the command if we don't
// the resume event might be received after we do the inspect