(t *testing.T)
| 11 | ) |
| 12 | |
| 13 | func TestContainerPrunePromptTermination(t *testing.T) { |
| 14 | ctx, cancel := context.WithCancel(context.Background()) |
| 15 | t.Cleanup(cancel) |
| 16 | |
| 17 | cli := test.NewFakeCli(&fakeClient{ |
| 18 | containerPruneFunc: func(ctx context.Context, opts client.ContainerPruneOptions) (client.ContainerPruneResult, error) { |
| 19 | return client.ContainerPruneResult{}, errors.New("fakeClient containerPruneFunc should not be called") |
| 20 | }, |
| 21 | }) |
| 22 | cmd := newPruneCommand(cli) |
| 23 | cmd.SetArgs([]string{}) |
| 24 | cmd.SetOut(io.Discard) |
| 25 | cmd.SetErr(io.Discard) |
| 26 | test.TerminatePrompt(ctx, t, cmd, cli) |
| 27 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…