Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -28,19 +28,19 @@ func TestPruneDontDeleteUsedDangling(t *testing.T) {
|
| 28 | 28 |
d.Start(t) |
| 29 | 29 |
defer d.Stop(t) |
| 30 | 30 |
|
| 31 |
- client := d.NewClientT(t) |
|
| 32 |
- defer client.Close() |
|
| 31 |
+ apiClient := d.NewClientT(t) |
|
| 32 |
+ defer apiClient.Close() |
|
| 33 | 33 |
|
| 34 |
- danglingID := specialimage.Load(ctx, t, client, specialimage.Dangling) |
|
| 34 |
+ danglingID := specialimage.Load(ctx, t, apiClient, specialimage.Dangling) |
|
| 35 | 35 |
|
| 36 |
- _, err := client.ImageInspect(ctx, danglingID) |
|
| 36 |
+ _, err := apiClient.ImageInspect(ctx, danglingID) |
|
| 37 | 37 |
assert.NilError(t, err, "Test dangling image doesn't exist") |
| 38 | 38 |
|
| 39 |
- container.Create(ctx, t, client, |
|
| 39 |
+ container.Create(ctx, t, apiClient, |
|
| 40 | 40 |
container.WithImage(danglingID), |
| 41 | 41 |
container.WithCmd("sleep", "60"))
|
| 42 | 42 |
|
| 43 |
- pruned, err := client.ImagesPrune(ctx, filters.NewArgs(filters.Arg("dangling", "true")))
|
|
| 43 |
+ pruned, err := apiClient.ImagesPrune(ctx, filters.NewArgs(filters.Arg("dangling", "true")))
|
|
| 44 | 44 |
assert.NilError(t, err) |
| 45 | 45 |
|
| 46 | 46 |
for _, deleted := range pruned.ImagesDeleted {
|
| ... | ... |
@@ -49,7 +49,7 @@ func TestPruneDontDeleteUsedDangling(t *testing.T) {
|
| 49 | 49 |
} |
| 50 | 50 |
} |
| 51 | 51 |
|
| 52 |
- _, err = client.ImageInspect(ctx, danglingID) |
|
| 52 |
+ _, err = apiClient.ImageInspect(ctx, danglingID) |
|
| 53 | 53 |
assert.NilError(t, err, "Test dangling image should still exist") |
| 54 | 54 |
} |
| 55 | 55 |
|