From cb500fe3b87656bb65fc8c0c32330db32c066cef Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Mon, 11 Sep 2017 17:41:24 +0100 Subject: [PATCH] Account for non-installed templates when preparing test run --- test/Templates.Test/Helpers/TemplatePackageInstaller.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/Templates.Test/Helpers/TemplatePackageInstaller.cs b/test/Templates.Test/Helpers/TemplatePackageInstaller.cs index a9bfb49464..ba272f156c 100644 --- a/test/Templates.Test/Helpers/TemplatePackageInstaller.cs +++ b/test/Templates.Test/Helpers/TemplatePackageInstaller.cs @@ -41,7 +41,11 @@ namespace Templates.Test.Helpers Directory.GetCurrentDirectory(), "dotnet", $"new --uninstall {packageName}"); - proc.WaitForExit(assertSuccess: true); + + // We don't need this command to succeed, because we'll verify next that + // uninstallation had the desired effect. This command is expected to fail + // in the case where the package wasn't previously installed. + proc.WaitForExit(assertSuccess: false); } VerifyCannotFindTemplate(output, "ASP.NET Core Empty");