(t *testing.T)
| 51 | } |
| 52 | |
| 53 | func TestRemoveWithForceOption(t *testing.T) { |
| 54 | force := false |
| 55 | cli := test.NewFakeCli(&fakeClient{ |
| 56 | pluginRemoveFunc: func(name string, options client.PluginRemoveOptions) (client.PluginRemoveResult, error) { |
| 57 | force = options.Force |
| 58 | return client.PluginRemoveResult{}, nil |
| 59 | }, |
| 60 | }) |
| 61 | cmd := newRemoveCommand(cli) |
| 62 | cmd.SetArgs([]string{"plugin-foo"}) |
| 63 | assert.NilError(t, cmd.Flags().Set("force", "true")) |
| 64 | assert.NilError(t, cmd.Execute()) |
| 65 | assert.Check(t, force) |
| 66 | assert.Check(t, is.Equal("plugin-foo\n", cli.OutBuffer().String())) |
| 67 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…