mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
client: rename ImageRemoveResult.Deleted to ImageRemoveResult.Items
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -35,5 +35,5 @@ func (cli *Client) ImageRemove(ctx context.Context, imageID string, options Imag
|
||||
|
||||
var dels []image.DeleteResponse
|
||||
err = json.NewDecoder(resp.Body).Decode(&dels)
|
||||
return ImageRemoveResult{Deleted: dels}, err
|
||||
return ImageRemoveResult{Items: dels}, err
|
||||
}
|
||||
|
||||
@@ -14,5 +14,5 @@ type ImageRemoveOptions struct {
|
||||
|
||||
// ImageRemoveResult holds the delete responses returned by the daemon.
|
||||
type ImageRemoveResult struct {
|
||||
Deleted []image.DeleteResponse
|
||||
Items []image.DeleteResponse
|
||||
}
|
||||
|
||||
@@ -91,8 +91,8 @@ func TestImageRemove(t *testing.T) {
|
||||
opts.Platforms = []ocispec.Platform{*removeCase.platform}
|
||||
}
|
||||
|
||||
imageDeletes, err := client.ImageRemove(context.Background(), "image_id", opts)
|
||||
res, err := client.ImageRemove(context.Background(), "image_id", opts)
|
||||
assert.NilError(t, err)
|
||||
assert.Check(t, is.Len(imageDeletes.Deleted, 2))
|
||||
assert.Check(t, is.Len(res.Items, 2))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user