Automated migration

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin
2018-03-05 18:53:52 -05:00
parent 5ef8835f23
commit 39c2ca57c1
158 changed files with 1812 additions and 1727 deletions

View File

@ -7,8 +7,9 @@ import (
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/debug"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
)
func TestClientDebugEnabled(t *testing.T) {
@ -18,9 +19,9 @@ func TestClientDebugEnabled(t *testing.T) {
cmd.Flags().Set("debug", "true")
err := cmd.PersistentPreRunE(cmd, []string{})
assert.NoError(t, err)
assert.Equal(t, "1", os.Getenv("DEBUG"))
assert.Equal(t, logrus.DebugLevel, logrus.GetLevel())
assert.Check(t, err)
assert.Check(t, is.Equal("1", os.Getenv("DEBUG")))
assert.Check(t, is.Equal(logrus.DebugLevel, logrus.GetLevel()))
}
func TestExitStatusForInvalidSubcommandWithHelpFlag(t *testing.T) {
@ -28,5 +29,5 @@ func TestExitStatusForInvalidSubcommandWithHelpFlag(t *testing.T) {
cmd := newDockerCommand(command.NewDockerCli(os.Stdin, discard, discard))
cmd.SetArgs([]string{"help", "invalid"})
err := cmd.Execute()
assert.EqualError(t, err, "unknown help topic: invalid")
assert.Check(t, is.Error(err, "unknown help topic: invalid"))
}