@@ -14,7 +14,7 @@ import (
1414func TestCheckpointRemoveErrors (t * testing.T ) {
1515 testCases := []struct {
1616 args []string
17- checkpointDeleteFunc func (container string , options client.CheckpointDeleteOptions ) error
17+ checkpointDeleteFunc func (container string , options client.CheckpointRemoveOptions ) (client. CheckpointRemoveResult , error )
1818 expectedError string
1919 }{
2020 {
@@ -27,8 +27,8 @@ func TestCheckpointRemoveErrors(t *testing.T) {
2727 },
2828 {
2929 args : []string {"foo" , "bar" },
30- checkpointDeleteFunc : func (container string , options client.CheckpointDeleteOptions ) error {
31- return errors .New ("error deleting checkpoint" )
30+ checkpointDeleteFunc : func (container string , options client.CheckpointRemoveOptions ) (client. CheckpointRemoveResult , error ) {
31+ return client. CheckpointRemoveResult {}, errors .New ("error deleting checkpoint" )
3232 },
3333 expectedError : "error deleting checkpoint" ,
3434 },
@@ -49,16 +49,16 @@ func TestCheckpointRemoveErrors(t *testing.T) {
4949func TestCheckpointRemoveWithOptions (t * testing.T ) {
5050 var containerID , checkpointID , checkpointDir string
5151 cli := test .NewFakeCli (& fakeClient {
52- checkpointDeleteFunc : func (container string , options client.CheckpointDeleteOptions ) error {
52+ checkpointDeleteFunc : func (container string , options client.CheckpointRemoveOptions ) (client. CheckpointRemoveResult , error ) {
5353 containerID = container
5454 checkpointID = options .CheckpointID
5555 checkpointDir = options .CheckpointDir
56- return nil
56+ return client. CheckpointRemoveResult {}, nil
5757 },
5858 })
5959 cmd := newRemoveCommand (cli )
6060 cmd .SetArgs ([]string {"container-foo" , "checkpoint-bar" })
61- cmd .Flags ().Set ("checkpoint-dir" , "/dir/foo" )
61+ assert . Check ( t , cmd .Flags ().Set ("checkpoint-dir" , "/dir/foo" ) )
6262 assert .NilError (t , cmd .Execute ())
6363 assert .Check (t , is .Equal ("container-foo" , containerID ))
6464 assert .Check (t , is .Equal ("checkpoint-bar" , checkpointID ))
0 commit comments