Move debug functions to cli/debug package

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester 2016-12-12 09:33:58 +01:00
parent 004fc6b9e4
commit 26c5b4b7b8
2 changed files with 4 additions and 4 deletions

View File

@ -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()
}
}

View File

@ -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")