From e174d702e483019a5978887befa26bd9ce6a3742 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 20 Apr 2021 14:15:04 -0700 Subject: [PATCH] [release/6.0-preview4] Clean Installer test (#51568) * Clean test * Remove dir deletion * Create parent dirs Co-authored-by: Mateo Torres Ruiz --- .../AppHostUsedWithSymbolicLinks.cs | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.AppHost.Tests/AppHostUsedWithSymbolicLinks.cs b/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.AppHost.Tests/AppHostUsedWithSymbolicLinks.cs index b36fb4311791f..f5e7a32a440b5 100644 --- a/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.AppHost.Tests/AppHostUsedWithSymbolicLinks.cs +++ b/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.AppHost.Tests/AppHostUsedWithSymbolicLinks.cs @@ -69,15 +69,15 @@ public void Run_apphost_behind_transitive_symlinks(string firstSymlinkRelativePa var appExe = fixture.TestProject.AppExe; var testDir = Directory.GetParent(fixture.TestProject.Location).ToString(); - Directory.CreateDirectory(Path.Combine(testDir, Path.GetDirectoryName(firstSymlinkRelativePath))); - Directory.CreateDirectory(Path.Combine(testDir, Path.GetDirectoryName(secondSymlinkRelativePath))); // second symlink -> apphost string secondSymbolicLink = Path.Combine(testDir, secondSymlinkRelativePath); + Directory.CreateDirectory(Path.GetDirectoryName(secondSymbolicLink)); CreateSymbolicLink(secondSymbolicLink, appExe); // first symlink -> second symlink string firstSymbolicLink = Path.Combine(testDir, firstSymlinkRelativePath); + Directory.CreateDirectory(Path.GetDirectoryName(firstSymbolicLink)); CreateSymbolicLink(firstSymbolicLink, secondSymbolicLink); Command.Create(firstSymbolicLink) @@ -86,12 +86,6 @@ public void Run_apphost_behind_transitive_symlinks(string firstSymlinkRelativePa .Execute() .Should().Pass() .And.HaveStdOutContaining("Hello World"); - - if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - Directory.Delete(firstSymbolicLink); - Directory.Delete(secondSymbolicLink); - } } //[Theory] @@ -199,11 +193,6 @@ public void Put_dotnet_behind_symlink() .Execute() .Should().Pass() .And.HaveStdOutContaining("Hello World"); - - if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - Directory.Delete(dotnetSymlink); - } } [Fact]