integration-cli: remove waitInspectWithArgs()

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2022-06-03 11:13:55 +02:00
parent 61c434c030
commit 018347f802
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C
2 changed files with 4 additions and 9 deletions

View file

@ -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

View file

@ -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 {