Need the release of Cobra following 1.0 to be able to disable file completion on the root command. Until then, we cannot because it would break 'helm help ' func TestRootFileCompletion(t *testing.T) { checkFileCompletion(t, "", false) }
(t *testing.T)
| 134 | // } |
| 135 | |
| 136 | func TestRootCmdLogger(t *testing.T) { |
| 137 | args := []string{} |
| 138 | buf := new(bytes.Buffer) |
| 139 | actionConfig := action.NewConfiguration() |
| 140 | _, err := newRootCmdWithConfig(actionConfig, buf, args, SetupLogging) |
| 141 | if err != nil { |
| 142 | t.Errorf("expected no error, got: '%v'", err) |
| 143 | } |
| 144 | |
| 145 | l1 := actionConfig.Logger() |
| 146 | l2 := slog.Default() |
| 147 | |
| 148 | if l1.Handler() != l2.Handler() { |
| 149 | t.Error("expected actionConfig logger to be the slog default logger") |
| 150 | } |
| 151 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…