(t *testing.T)
| 57 | } |
| 58 | |
| 59 | func TestRunDiffClientError(t *testing.T) { |
| 60 | clientError := errors.New("client error") |
| 61 | |
| 62 | cli := test.NewFakeCli(&fakeClient{ |
| 63 | containerDiffFunc: func(ctx context.Context, containerID string) (client.ContainerDiffResult, error) { |
| 64 | return client.ContainerDiffResult{}, clientError |
| 65 | }, |
| 66 | }) |
| 67 | |
| 68 | cmd := newDiffCommand(cli) |
| 69 | cmd.SetOut(io.Discard) |
| 70 | cmd.SetErr(io.Discard) |
| 71 | |
| 72 | cmd.SetArgs([]string{"container-id"}) |
| 73 | |
| 74 | err := cmd.Execute() |
| 75 | assert.ErrorIs(t, err, clientError) |
| 76 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…