diff --git a/daemon_none_test.go b/daemon_none_test.go index bd42add986..af0fcfd670 100644 --- a/daemon_none_test.go +++ b/daemon_none_test.go @@ -5,7 +5,7 @@ package main import ( "testing" - "github.com/docker/docker/pkg/testutil/assert" + "github.com/stretchr/testify/assert" ) func TestDaemonCommand(t *testing.T) { @@ -13,5 +13,5 @@ func TestDaemonCommand(t *testing.T) { cmd.SetArgs([]string{"--version"}) err := cmd.Execute() - assert.Error(t, err, "Please run `dockerd`") + assert.EqualError(t, err, "Please run `dockerd`") } diff --git a/daemon_unit_test.go b/daemon_unit_test.go index 26348a8843..ffd8a5e2f5 100644 --- a/daemon_unit_test.go +++ b/daemon_unit_test.go @@ -5,8 +5,8 @@ package main import ( "testing" - "github.com/docker/docker/pkg/testutil/assert" "github.com/spf13/cobra" + "github.com/stretchr/testify/assert" ) func stubRun(cmd *cobra.Command, args []string) error { @@ -18,7 +18,7 @@ func TestDaemonCommandHelp(t *testing.T) { cmd.RunE = stubRun cmd.SetArgs([]string{"--help"}) err := cmd.Execute() - assert.NilError(t, err) + assert.NoError(t, err) } func TestDaemonCommand(t *testing.T) { @@ -26,5 +26,5 @@ func TestDaemonCommand(t *testing.T) { cmd.RunE = stubRun cmd.SetArgs([]string{"--containerd", "/foo"}) err := cmd.Execute() - assert.NilError(t, err) + assert.NoError(t, err) } diff --git a/docker_test.go b/docker_test.go index f8a5297ed4..88afb41e9e 100644 --- a/docker_test.go +++ b/docker_test.go @@ -8,7 +8,7 @@ import ( "github.com/Sirupsen/logrus" "github.com/docker/docker/cli/command" "github.com/docker/docker/cli/debug" - "github.com/docker/docker/pkg/testutil/assert" + "github.com/stretchr/testify/assert" ) func TestClientDebugEnabled(t *testing.T) { @@ -18,9 +18,9 @@ func TestClientDebugEnabled(t *testing.T) { cmd.Flags().Set("debug", "true") err := cmd.PersistentPreRunE(cmd, []string{}) - assert.NilError(t, err) - assert.Equal(t, os.Getenv("DEBUG"), "1") - assert.Equal(t, logrus.GetLevel(), logrus.DebugLevel) + assert.NoError(t, err) + assert.Equal(t, "1", os.Getenv("DEBUG")) + assert.Equal(t, logrus.DebugLevel, logrus.GetLevel()) } func TestExitStatusForInvalidSubcommandWithHelpFlag(t *testing.T) { @@ -28,5 +28,5 @@ func TestExitStatusForInvalidSubcommandWithHelpFlag(t *testing.T) { cmd := newDockerCommand(command.NewDockerCli(os.Stdin, discard, discard)) cmd.SetArgs([]string{"help", "invalid"}) err := cmd.Execute() - assert.Error(t, err, "unknown help topic: invalid") + assert.EqualError(t, err, "unknown help topic: invalid") }