We have a few tests that write their own NuGet.Config file to use during restore. Those tests need access to the ExternalRestoreSources value to be added to this NuGet config so that they can restore properly. This change writes a file in the test/artifacts folder containing the value of ExternalRestoreSources value. The tests can then use it to write that to their NuGet.Config. There is a failure in ProdCon that this addresses.

This commit is contained in:
Livar Cunha 2018-08-28 17:16:58 -07:00
parent 8aa75cf28e
commit 7bb693bff5
5 changed files with 51 additions and 4 deletions

View file

@ -339,7 +339,7 @@ namespace Microsoft.DotNet.Tests
var testInstance = TestAssets.Get("AppWithFallbackFolderToolDependency")
.CreateInstance()
.WithSourceFiles()
.WithNuGetConfig(new RepoDirectoriesProvider().TestPackages);
.WithNuGetConfigAndExternalRestoreSources(new RepoDirectoriesProvider().TestPackages);
var testProjectDirectory = testInstance.Root.FullName;
var fallbackFolder = Path.Combine(testProjectDirectory, "fallbackFolder");
@ -382,7 +382,7 @@ namespace Microsoft.DotNet.Tests
var testInstance = TestAssets.Get("AppWithFallbackFolderToolDependency")
.CreateInstance()
.WithSourceFiles()
.WithNuGetConfig(new RepoDirectoriesProvider().TestPackages);
.WithNuGetConfigAndExternalRestoreSources(new RepoDirectoriesProvider().TestPackages);
var testProjectDirectory = testInstance.Root.FullName;
var fallbackFolder = Path.Combine(testProjectDirectory, "fallbackFolder");