(t *testing.T)
| 116 | } |
| 117 | |
| 118 | func TestPrunePromptTermination(t *testing.T) { |
| 119 | ctx, cancel := context.WithCancel(context.Background()) |
| 120 | t.Cleanup(cancel) |
| 121 | |
| 122 | cli := test.NewFakeCli(&fakeClient{ |
| 123 | imagePruneFunc: func(client.ImagePruneOptions) (client.ImagePruneResult, error) { |
| 124 | return client.ImagePruneResult{}, errors.New("fakeClient imagePruneFunc should not be called") |
| 125 | }, |
| 126 | }) |
| 127 | cmd := newPruneCommand(cli) |
| 128 | cmd.SetArgs([]string{}) |
| 129 | cmd.SetOut(io.Discard) |
| 130 | cmd.SetErr(io.Discard) |
| 131 | test.TerminatePrompt(ctx, t, cmd, cli) |
| 132 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…