Browse Source

integration-cli: remove waitInspectWithArgs()

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 3 years ago
parent
commit
018347f802

+ 2 - 2
integration-cli/docker_cli_daemon_test.go

@@ -178,7 +178,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartOnFailure(c *testing.T) {
 
 
 	// wait test1 to stop
 	// wait test1 to stop
 	hostArgs := []string{"--host", s.d.Sock()}
 	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")
 	assert.NilError(c, err, "test1 should exit but not")
 
 
 	// record last start time
 	// record last start time
@@ -189,7 +189,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartOnFailure(c *testing.T) {
 	s.d.Restart(c)
 	s.d.Restart(c)
 
 
 	// test1 shouldn't restart at all
 	// 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")
 	assert.NilError(c, err, "test1 should exit but not")
 
 
 	// make sure test1 isn't restarted when daemon restart
 	// make sure test1 isn't restarted when daemon restart

+ 2 - 7
integration-cli/docker_utils_test.go

@@ -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.
 // waitRun will wait for the specified container to be running, maximum 5 seconds.
 // Deprecated: use cli.WaitFor
 // Deprecated: use cli.WaitFor
 func waitRun(contID string) error {
 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
 // waitInspect will wait for the specified container to have the specified string
@@ -319,12 +319,7 @@ func waitRun(contID string) error {
 // is reached.
 // is reached.
 // Deprecated: use cli.WaitFor
 // Deprecated: use cli.WaitFor
 func waitInspect(name, expr, expected string, timeout time.Duration) error {
 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 {
 func getInspectBody(c *testing.T, version, id string) []byte {