Fix test that depended on old output directory layout
This commit is contained in:
parent
546eff28c2
commit
27dc8032dd
3 changed files with 20 additions and 7 deletions
17
test/dotnet-new.Tests/AspNetNuGetConfiguration.cs
Normal file
17
test/dotnet-new.Tests/AspNetNuGetConfiguration.cs
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
namespace Microsoft.DotNet.New.Tests
|
||||||
|
{
|
||||||
|
public class AspNetNuGetConfiguration
|
||||||
|
{
|
||||||
|
public static void WriteNuGetConfigWithAspNetPrivateFeeds(string path)
|
||||||
|
{
|
||||||
|
string resourceName = "dotnet-new.Tests.NuGet.tempaspnetpatch.config";
|
||||||
|
using (Stream input = typeof(GivenThatIWantANewAppWithSpecifiedType).Assembly.GetManifestResourceStream(resourceName))
|
||||||
|
using (Stream output = File.OpenWrite(path))
|
||||||
|
{
|
||||||
|
input.CopyTo(output);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -45,7 +45,8 @@ namespace Microsoft.DotNet.New.Tests
|
||||||
var packagesDirectory = Path.Combine(rootPath, "packages");
|
var packagesDirectory = Path.Combine(rootPath, "packages");
|
||||||
|
|
||||||
// For testing the 2.1 templates - some of their packages are currently only in private feeds.
|
// For testing the 2.1 templates - some of their packages are currently only in private feeds.
|
||||||
var configFile = Path.Combine(rootPath, "..", "..", "..", "..", "..", "NuGet.tempaspnetpatch.config");
|
var configFile = Path.Combine(rootPath, "NuGet.Config");
|
||||||
|
AspNetNuGetConfiguration.WriteNuGetConfigWithAspNetPrivateFeeds(configFile);
|
||||||
// For "normal" builds, once the packages needed for 2.1 templates are in the public feeds
|
// For "normal" builds, once the packages needed for 2.1 templates are in the public feeds
|
||||||
//var configFile = Path.Combine(RepoDirectoriesProvider.RepoRoot, "NuGet.Config");
|
//var configFile = Path.Combine(RepoDirectoriesProvider.RepoRoot, "NuGet.Config");
|
||||||
|
|
||||||
|
|
|
@ -51,12 +51,7 @@ namespace Microsoft.DotNet.New.Tests
|
||||||
|
|
||||||
if (useNuGetConfigForAspNet)
|
if (useNuGetConfigForAspNet)
|
||||||
{
|
{
|
||||||
string resourceName = "dotnet-new.Tests.NuGet.tempaspnetpatch.config";
|
AspNetNuGetConfiguration.WriteNuGetConfigWithAspNetPrivateFeeds(Path.Combine(rootPath, "NuGet.Config"));
|
||||||
using (Stream input = typeof(GivenThatIWantANewAppWithSpecifiedType).Assembly.GetManifestResourceStream(resourceName))
|
|
||||||
using (Stream output = File.OpenWrite(Path.Combine(rootPath, "NuGet.Config")))
|
|
||||||
{
|
|
||||||
input.CopyTo(output);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (skipSpaWebpackSteps)
|
if (skipSpaWebpackSteps)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue