fix cache test
This commit is contained in:
parent
94dab4559a
commit
99301d0d95
5 changed files with 12 additions and 8 deletions
|
@ -0,0 +1,3 @@
|
|||
<CacheArtifacts>
|
||||
<Package Id="Newtonsoft.Json" Version ="9.0.1"/>
|
||||
</CacheArtifacts>
|
|
@ -97,7 +97,7 @@ namespace Microsoft.DotNet.Tools.Publish
|
|||
|
||||
if (!string.IsNullOrEmpty(filterProjOption.Value()))
|
||||
{
|
||||
msbuildArgs.Add($"/p:FilterProjFile={filterProjOption.Value()}");
|
||||
msbuildArgs.Add($"/p:FilterProjectFiles={filterProjOption.Value()}");
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(verbosityOption.Value()))
|
||||
|
|
|
@ -17,12 +17,12 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
|
|||
{
|
||||
private static string _tfm = "netcoreapp2.0";
|
||||
private static string _frameworkVersion = Microsoft.DotNet.TestFramework.TestAssetInstance.CurrentRuntimeFrameworkVersion;
|
||||
|
||||
private static string _arch = Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment.RuntimeArchitecture.ToLowerInvariant();
|
||||
[Fact]
|
||||
public void ItPublishesARunnablePortableApp()
|
||||
{
|
||||
var testAppName = "NewtonSoftDependentProject";
|
||||
var profileProjectName = "NewtonsoftFilterProfile";
|
||||
var profileProjectName = "NewtonsoftProfile";
|
||||
|
||||
var testInstance = TestAssets.Get(testAppName)
|
||||
.CreateInstance()
|
||||
|
@ -55,11 +55,12 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
|
|||
.Should().Pass();
|
||||
|
||||
var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
|
||||
var profilefilter = Path.Combine(localAssemblyCache, _arch, _tfm, "artifact.xml");
|
||||
|
||||
new PublishCommand()
|
||||
.WithFramework(_tfm)
|
||||
.WithWorkingDirectory(testProjectDirectory)
|
||||
.WithProFileProject(profileProject)
|
||||
.WithProFileProject(profilefilter)
|
||||
.Execute()
|
||||
.Should().Pass();
|
||||
|
||||
|
@ -76,7 +77,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
|
|||
public void AppFailsDueToMissingCache()
|
||||
{
|
||||
var testAppName = "NewtonSoftDependentProject";
|
||||
var profileProjectName = "NewtonsoftFilterProfile";
|
||||
var profileProjectName = "NewtonsoftProfile";
|
||||
|
||||
var testInstance = TestAssets.Get(testAppName)
|
||||
.CreateInstance()
|
||||
|
@ -88,7 +89,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
|
|||
.CreateInstance()
|
||||
.WithSourceFiles()
|
||||
.Root.FullName;
|
||||
var profileProject = Path.Combine(profileProjectPath, $"{profileProjectName}.xml");
|
||||
var profileProject = Path.Combine(profileProjectPath, "NewtonsoftFilterProfile.xml");
|
||||
|
||||
new RestoreCommand()
|
||||
.WithWorkingDirectory(testProjectDirectory)
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace Microsoft.DotNet.Cli.MSBuild.Tests
|
|||
[InlineData(new string[] { "-c", "<configuration>" }, "/p:Configuration=<configuration>")]
|
||||
[InlineData(new string[] { "--configuration", "<configuration>" }, "/p:Configuration=<configuration>")]
|
||||
[InlineData(new string[] { "--version-suffix", "<version-suffix>" }, "/p:VersionSuffix=<version-suffix>")]
|
||||
[InlineData(new string[] { "--filter", "<filter>" }, "/p:FilterProjFile=<filter>")]
|
||||
[InlineData(new string[] { "--filter", "<filter>" }, "/p:FilterProjectFiles=<filter>")]
|
||||
[InlineData(new string[] { "-v", "<verbosity>" }, "/verbosity:<verbosity>")]
|
||||
[InlineData(new string[] { "--verbosity", "<verbosity>" }, "/verbosity:<verbosity>")]
|
||||
[InlineData(new string[] { "<project>" }, "<project>")]
|
||||
|
|
Loading…
Reference in a new issue