MCPcopy Index your code
hub / github.com/docker/cli / TestDisableFlagsInUseLineIsSet

Function TestDisableFlagsInUseLineIsSet

cmd/docker/docker_test.go:25–39  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

23)
24
25func TestDisableFlagsInUseLineIsSet(t *testing.T) {
26 dockerCli, err := command.NewDockerCli(command.WithBaseContext(context.TODO()))
27 assert.NilError(t, err)
28 rootCmd := &cobra.Command{DisableFlagsInUseLine: true}
29 commands.AddCommands(rootCmd, dockerCli)
30
31 var errs []error
32 visitAll(rootCmd, func(c *cobra.Command) {
33 if !c.DisableFlagsInUseLine {
34 errs = append(errs, errors.New("DisableFlagsInUseLine is not set for "+c.CommandPath()))
35 }
36 })
37 err = errors.Join(errs...)
38 assert.NilError(t, err)
39}
40
41func TestClientDebugEnabled(t *testing.T) {
42 defer debug.Disable()

Callers

nothing calls this directly

Calls 1

visitAllFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…