(t *testing.T)
| 23 | ) |
| 24 | |
| 25 | func 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 | |
| 41 | func TestClientDebugEnabled(t *testing.T) { |
| 42 | defer debug.Disable() |
nothing calls this directly
no test coverage detected
searching dependent graphs…