From 760c47821f1bc1335d112abfa2e43247e45fc96c Mon Sep 17 00:00:00 2001 From: Ryan Nowak Date: Wed, 11 Mar 2020 17:04:17 -0700 Subject: [PATCH] Pass --force when deleting images We need --force to do proper cleanup. If you end up in a situation where an image has multiple tags then you won't be able to remove it without --force. --- test/E2ETest/DockerAssert.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/E2ETest/DockerAssert.cs b/test/E2ETest/DockerAssert.cs index 6f5d3ed7..0f6de1a8 100644 --- a/test/E2ETest/DockerAssert.cs +++ b/test/E2ETest/DockerAssert.cs @@ -55,15 +55,15 @@ namespace E2ETest foreach (var id in ids) { - output.WriteLine($"> docker rmi \"{id}\""); + output.WriteLine($"> docker rmi \"{id}\" --force"); var exitCode = await Process.ExecuteAsync( "docker", - $"rmi \"{id}\"", + $"rmi \"{id}\" --force", stdOut: OnOutput, stdErr: OnOutput); if (exitCode != 0) { - throw new XunitException($"Running `docker rmi \"{id}\"` failed." + Environment.NewLine + builder.ToString()); + throw new XunitException($"Running `docker rmi \"{id}\" --force` failed." + Environment.NewLine + builder.ToString()); } builder.Clear();