From ad6a0d52b09a1e510debaa0c74e81b83030f2c0f Mon Sep 17 00:00:00 2001 From: David Fowler Date: Thu, 2 Apr 2020 09:19:21 -0700 Subject: [PATCH] Clean up test to use new helpers --- test/E2ETest/TyeRunTests.cs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/test/E2ETest/TyeRunTests.cs b/test/E2ETest/TyeRunTests.cs index f632f8d0..9848b137 100644 --- a/test/E2ETest/TyeRunTests.cs +++ b/test/E2ETest/TyeRunTests.cs @@ -282,12 +282,9 @@ namespace E2ETest [SkipIfDockerNotRunning] public async Task DockerNetworkAssignmentTest() { - var projectDirectory = new DirectoryInfo( - Path.Combine(GetSolutionRootDirectory("tye"), "samples", "frontend-backend")); - using var tempDirectory = TempDirectory.Create(true); - DirectoryCopy.Copy(projectDirectory.FullName, tempDirectory.DirectoryPath); + using var projectDirectory = CopySampleProjectDirectory("frontend-backend"); - var projectFile = new FileInfo(Path.Combine(tempDirectory.DirectoryPath, "tye.yaml")); + var projectFile = new FileInfo(Path.Combine(projectDirectory.DirectoryPath, "tye.yaml")); var outputContext = new OutputContext(_sink, Verbosity.Debug); var application = await ApplicationFactory.CreateAsync(outputContext, projectFile); @@ -342,12 +339,9 @@ namespace E2ETest [SkipIfDockerNotRunning] public async Task DockerNetworkAssignmentForNonExistingNetworkTest() { - var projectDirectory = new DirectoryInfo( - Path.Combine(GetSolutionRootDirectory("tye"), "samples", "frontend-backend")); - using var tempDirectory = TempDirectory.Create(true); - DirectoryCopy.Copy(projectDirectory.FullName, tempDirectory.DirectoryPath); + using var projectDirectory = CopySampleProjectDirectory("frontend-backend"); - var projectFile = new FileInfo(Path.Combine(tempDirectory.DirectoryPath, "tye.yaml")); + var projectFile = new FileInfo(Path.Combine(projectDirectory.DirectoryPath, "tye.yaml")); var outputContext = new OutputContext(_sink, Verbosity.Debug); var application = await ApplicationFactory.CreateAsync(outputContext, projectFile);