Fix test logic for verifying template uninstallation. Now respects global.json for SDK selection.
This commit is contained in:
parent
0a077a21f8
commit
a067713a96
|
|
@ -73,9 +73,11 @@ namespace Templates.Test.Helpers
|
||||||
private static void VerifyCannotFindTemplate(ITestOutputHelper output, string templateName)
|
private static void VerifyCannotFindTemplate(ITestOutputHelper output, string templateName)
|
||||||
{
|
{
|
||||||
// Verify we really did remove the previous templates
|
// Verify we really did remove the previous templates
|
||||||
var tempDir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("D"));
|
var tempDir = Path.Combine(Directory.GetCurrentDirectory(), Guid.NewGuid().ToString("D"));
|
||||||
Directory.CreateDirectory(tempDir);
|
Directory.CreateDirectory(tempDir);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
var proc = ProcessEx.Run(
|
var proc = ProcessEx.Run(
|
||||||
output,
|
output,
|
||||||
tempDir,
|
tempDir,
|
||||||
|
|
@ -86,9 +88,12 @@ namespace Templates.Test.Helpers
|
||||||
{
|
{
|
||||||
throw new InvalidOperationException($"Failed to uninstall previous templates. The template '{templateName}' could still be found.");
|
throw new InvalidOperationException($"Failed to uninstall previous templates. The template '{templateName}' could still be found.");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
Directory.Delete(tempDir);
|
Directory.Delete(tempDir);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static string FindAncestorDirectoryContaining(string filename)
|
private static string FindAncestorDirectoryContaining(string filename)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue