(t *testing.T)
| 45 | } |
| 46 | |
| 47 | func TestConfigRemoveWithName(t *testing.T) { |
| 48 | names := []string{"foo", "bar"} |
| 49 | var removedConfigs []string |
| 50 | cli := test.NewFakeCli(&fakeClient{ |
| 51 | configRemoveFunc: func(_ context.Context, name string, _ client.ConfigRemoveOptions) (client.ConfigRemoveResult, error) { |
| 52 | removedConfigs = append(removedConfigs, name) |
| 53 | return client.ConfigRemoveResult{}, nil |
| 54 | }, |
| 55 | }) |
| 56 | cmd := newConfigRemoveCommand(cli) |
| 57 | cmd.SetArgs(names) |
| 58 | assert.NilError(t, cmd.Execute()) |
| 59 | assert.Check(t, is.DeepEqual(names, strings.Split(strings.TrimSpace(cli.OutBuffer().String()), "\n"))) |
| 60 | assert.Check(t, is.DeepEqual(names, removedConfigs)) |
| 61 | } |
| 62 | |
| 63 | func TestConfigRemoveContinueAfterError(t *testing.T) { |
| 64 | names := []string{"foo", "bar"} |
nothing calls this directly
no test coverage detected
searching dependent graphs…