integration/volume: TestRunMountImage: use test-util for container cleanup

update the defer to use the container test-utils package to fix unhandled
error warnings.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-03-04 01:18:19 +01:00
parent e41eaf2c8d
commit 28bf578a40

View File

@@ -181,7 +181,7 @@ func TestRunMountImage(t *testing.T) {
create, creatErr := apiClient.ContainerCreate(ctx, &cfg, &hostCfg, &network.NetworkingConfig{}, nil, ctrName)
id := create.ID
if id != "" {
defer apiClient.ContainerRemove(ctx, id, containertypes.RemoveOptions{Force: true})
defer container.Remove(ctx, t, apiClient, id, containertypes.RemoveOptions{Force: true})
}
if tc.createErr != "" {