(t *testing.T)
| 47 | } |
| 48 | |
| 49 | func TestCheckpointRemoveWithOptions(t *testing.T) { |
| 50 | var containerID, checkpointID, checkpointDir string |
| 51 | cli := test.NewFakeCli(&fakeClient{ |
| 52 | checkpointDeleteFunc: func(container string, options client.CheckpointRemoveOptions) (client.CheckpointRemoveResult, error) { |
| 53 | containerID = container |
| 54 | checkpointID = options.CheckpointID |
| 55 | checkpointDir = options.CheckpointDir |
| 56 | return client.CheckpointRemoveResult{}, nil |
| 57 | }, |
| 58 | }) |
| 59 | cmd := newRemoveCommand(cli) |
| 60 | cmd.SetArgs([]string{"container-foo", "checkpoint-bar"}) |
| 61 | assert.Check(t, cmd.Flags().Set("checkpoint-dir", "/dir/foo")) |
| 62 | assert.NilError(t, cmd.Execute()) |
| 63 | assert.Check(t, is.Equal("container-foo", containerID)) |
| 64 | assert.Check(t, is.Equal("checkpoint-bar", checkpointID)) |
| 65 | assert.Check(t, is.Equal("/dir/foo", checkpointDir)) |
| 66 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…