Update tests to use icmd

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin
2017-08-23 17:01:29 -04:00
parent 0a7ff351b7
commit 92427b3a81
44 changed files with 78 additions and 79 deletions

View File

@@ -34,11 +34,11 @@ import (
"github.com/docker/docker/opts"
"github.com/docker/docker/pkg/mount"
"github.com/docker/docker/pkg/stringid"
icmd "github.com/docker/docker/pkg/testutil/cmd"
units "github.com/docker/go-units"
"github.com/docker/libnetwork/iptables"
"github.com/docker/libtrust"
"github.com/go-check/check"
"github.com/gotestyourself/gotestyourself/icmd"
"github.com/kr/pty"
"golang.org/x/sys/unix"
)
@@ -834,7 +834,7 @@ func (s *DockerDaemonSuite) TestDaemonDefaultNetworkInvalidClusterConfig(c *chec
// Start daemon with docker0 bridge
result := icmd.RunCommand("ifconfig", defaultNetworkBridge)
c.Assert(result, icmd.Matches, icmd.Success)
result.Assert(c, icmd.Success)
s.d.Restart(c, fmt.Sprintf("--cluster-store=%s", discoveryBackend))
}
@@ -2105,7 +2105,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartWithUnpausedRunningContainer(t *che
ctrBinary,
"--address", "unix:///var/run/docker/libcontainerd/docker-containerd.sock",
"containers", "resume", cid)
t.Assert(result, icmd.Matches, icmd.Success)
result.Assert(t, 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