mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
client: refactor ContainerList to wrap result
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
This commit is contained in:
@@ -176,10 +176,10 @@ func Remove(ctx context.Context, t *testing.T, apiClient client.APIClient, conta
|
||||
func RemoveAll(ctx context.Context, t *testing.T, apiClient client.APIClient) {
|
||||
t.Helper()
|
||||
|
||||
containers, err := apiClient.ContainerList(ctx, client.ContainerListOptions{All: true})
|
||||
list, err := apiClient.ContainerList(ctx, client.ContainerListOptions{All: true})
|
||||
assert.NilError(t, err)
|
||||
|
||||
for _, c := range containers {
|
||||
for _, c := range list.Items {
|
||||
Remove(ctx, t, apiClient, c.ID, client.ContainerRemoveOptions{Force: true})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user