diff --git a/daemon/logger/gelf/gelf_test.go b/daemon/logger/gelf/gelf_test.go index 32d6175639..ab1f377eef 100644 --- a/daemon/logger/gelf/gelf_test.go +++ b/daemon/logger/gelf/gelf_test.go @@ -193,7 +193,7 @@ func TestNewGELFUDPWriter(t *testing.T) { if err != nil { t.Fatal(err) } - writer.Close() + err = writer.Close() if err != nil { t.Fatal(err) } diff --git a/integration-cli/daemon/daemon.go b/integration-cli/daemon/daemon.go index a9de8df8d4..4919c7ebb0 100644 --- a/integration-cli/daemon/daemon.go +++ b/integration-cli/daemon/daemon.go @@ -106,6 +106,7 @@ func (d *Daemon) WaitRun(contID string) error { } // WaitInspectWithArgs waits for the specified expression to be equals to the specified expected string in the given time. +// // Deprecated: use cli.WaitCmd instead func WaitInspectWithArgs(dockerBinary, name, expr, expected string, timeout time.Duration, arg ...string) error { after := time.After(timeout) diff --git a/integration-cli/docker_cli_build_test.go b/integration-cli/docker_cli_build_test.go index 343ddc9900..c4ef36b262 100644 --- a/integration-cli/docker_cli_build_test.go +++ b/integration-cli/docker_cli_build_test.go @@ -560,8 +560,8 @@ RUN [ $(ls -l /exists/exists_file | awk '{print $3":"$4}') = 'dockerio:dockerio' build.WithFile("test_file1", "test1"), build.WithFile("test_file2", "test2"), build.WithFile("test_file3", "test3"), - build.WithFile("test_file3", "test3"), - build.WithFile("test_file4", "test4"))) + build.WithFile("test_file4", "test4"), + )) } // These tests are mainly for user namespaces to verify that new directories diff --git a/integration-cli/docker_cli_daemon_test.go b/integration-cli/docker_cli_daemon_test.go index 98b59a762a..e8dd08260f 100644 --- a/integration-cli/docker_cli_daemon_test.go +++ b/integration-cli/docker_cli_daemon_test.go @@ -178,7 +178,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartOnFailure(c *testing.T) { // wait test1 to stop hostArgs := []string{"--host", s.d.Sock()} - err = daemon.WaitInspectWithArgs(dockerBinary, "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...) //nolint:staticcheck // TODO WaitInspectWithArgs is deprecated. 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 = daemon.WaitInspectWithArgs(dockerBinary, "test1", "{{.State.Running}} {{.State.Restarting}}", "false false", 0, hostArgs...) + err = daemon.WaitInspectWithArgs(dockerBinary, "test1", "{{.State.Running}} {{.State.Restarting}}", "false false", 0, hostArgs...) //nolint:staticcheck // TODO WaitInspectWithArgs is deprecated. assert.NilError(c, err, "test1 should exit but not") // make sure test1 isn't restarted when daemon restart diff --git a/integration-cli/docker_utils_test.go b/integration-cli/docker_utils_test.go index 5b25312bf0..6dfa14b0be 100644 --- a/integration-cli/docker_utils_test.go +++ b/integration-cli/docker_utils_test.go @@ -247,6 +247,7 @@ func appendBaseEnv(isTLS bool, env ...string) []string { // waitInspect will wait for the specified container to have the specified string // in the inspect output. It will wait until the specified timeout (in seconds) // is reached. +// // Deprecated: use cli.WaitFor func waitInspect(name, expr, expected string, timeout time.Duration) error { return daemon.WaitInspectWithArgs(dockerBinary, name, expr, expected, timeout)