Skip to content

Commit

Permalink
[release/6.0-preview4] Clean Installer test (#51568)
Browse files Browse the repository at this point in the history
* Clean test

* Remove dir deletion

* Create parent dirs

Co-authored-by: Mateo Torres Ruiz <matorre@microsoft.com>
  • Loading branch information
github-actions[bot] and Mateo Torres Ruiz authored Apr 20, 2021
1 parent 7878130 commit e174d70
Showing 1 changed file with 2 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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]
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit e174d70

Please sign in to comment.