mirror of https://github.com/docker/cli.git
Move debug functions to cli/debug package
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
parent
004fc6b9e4
commit
26c5b4b7b8
|
@ -10,11 +10,11 @@ import (
|
|||
"github.com/docker/docker/cli"
|
||||
"github.com/docker/docker/cli/command"
|
||||
"github.com/docker/docker/cli/command/commands"
|
||||
"github.com/docker/docker/cli/debug"
|
||||
cliflags "github.com/docker/docker/cli/flags"
|
||||
"github.com/docker/docker/cliconfig"
|
||||
"github.com/docker/docker/dockerversion"
|
||||
"github.com/docker/docker/pkg/term"
|
||||
"github.com/docker/docker/utils"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/pflag"
|
||||
)
|
||||
|
@ -130,7 +130,7 @@ func dockerPreRun(opts *cliflags.ClientOptions) {
|
|||
}
|
||||
|
||||
if opts.Common.Debug {
|
||||
utils.EnableDebug()
|
||||
debug.Enable()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,12 +7,12 @@ 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/docker/docker/utils"
|
||||
)
|
||||
|
||||
func TestClientDebugEnabled(t *testing.T) {
|
||||
defer utils.DisableDebug()
|
||||
defer debug.Disable()
|
||||
|
||||
cmd := newDockerCommand(&command.DockerCli{})
|
||||
cmd.Flags().Set("debug", "true")
|
||||
|
|
Loading…
Reference in New Issue