integration-cli: remove waitInspectWithArgs()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
61c434c030
commit
018347f802
2 changed files with 4 additions and 9 deletions
|
@ -178,7 +178,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartOnFailure(c *testing.T) {
|
|||
|
||||
// wait test1 to stop
|
||||
hostArgs := []string{"--host", s.d.Sock()}
|
||||
err = waitInspectWithArgs("test1", "{{.State.Running}} {{.State.Restarting}}", "false false", 10*time.Second, hostArgs...)
|
||||
err = daemon.WaitInspectWithArgs(dockerBinary, "test1", "{{.State.Running}} {{.State.Restarting}}", "false false", 10*time.Second, hostArgs...)
|
||||
assert.NilError(c, err, "test1 should exit but not")
|
||||
|
||||
// record last start time
|
||||
|
@ -189,7 +189,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartOnFailure(c *testing.T) {
|
|||
s.d.Restart(c)
|
||||
|
||||
// test1 shouldn't restart at all
|
||||
err = waitInspectWithArgs("test1", "{{.State.Running}} {{.State.Restarting}}", "false false", 0, hostArgs...)
|
||||
err = daemon.WaitInspectWithArgs(dockerBinary, "test1", "{{.State.Running}} {{.State.Restarting}}", "false false", 0, hostArgs...)
|
||||
assert.NilError(c, err, "test1 should exit but not")
|
||||
|
||||
// make sure test1 isn't restarted when daemon restart
|
||||
|
|
|
@ -311,7 +311,7 @@ func createTmpFile(c *testing.T, content string) string {
|
|||
// waitRun will wait for the specified container to be running, maximum 5 seconds.
|
||||
// Deprecated: use cli.WaitFor
|
||||
func waitRun(contID string) error {
|
||||
return waitInspect(contID, "{{.State.Running}}", "true", 5*time.Second)
|
||||
return daemon.WaitInspectWithArgs(dockerBinary, contID, "{{.State.Running}}", "true", 5*time.Second)
|
||||
}
|
||||
|
||||
// waitInspect will wait for the specified container to have the specified string
|
||||
|
@ -319,12 +319,7 @@ func waitRun(contID string) error {
|
|||
// is reached.
|
||||
// Deprecated: use cli.WaitFor
|
||||
func waitInspect(name, expr, expected string, timeout time.Duration) error {
|
||||
return waitInspectWithArgs(name, expr, expected, timeout)
|
||||
}
|
||||
|
||||
// Deprecated: use cli.WaitFor
|
||||
func waitInspectWithArgs(name, expr, expected string, timeout time.Duration, arg ...string) error {
|
||||
return daemon.WaitInspectWithArgs(dockerBinary, name, expr, expected, timeout, arg...)
|
||||
return daemon.WaitInspectWithArgs(dockerBinary, name, expr, expected, timeout)
|
||||
}
|
||||
|
||||
func getInspectBody(c *testing.T, version, id string) []byte {
|
||||
|
|
Loading…
Add table
Reference in a new issue