Remove unnecessary handling of verbosity in RestoreCommand
We were taking care to set the console verbosity to minimal, but only when no verbosity argument is passed. However, the default verbosity for all CLI msbuild commands is already minimal and so we can just get out of the way.
This commit is contained in:
parent
1421c10f1d
commit
20b0b820a8
2 changed files with 2 additions and 27 deletions
|
@ -13,9 +13,6 @@ namespace Microsoft.DotNet.Cli.MSBuild.Tests
|
|||
private const string ExpectedPrefix =
|
||||
"exec <msbuildpath> /m /v:m /NoLogo /t:Restore";
|
||||
|
||||
private string ExpectedPrefixWithConsoleLoggerParamaters =
|
||||
$"{ExpectedPrefix} /ConsoleLoggerParameters:Verbosity=Minimal";
|
||||
|
||||
[Theory]
|
||||
[InlineData(new string[] { }, "")]
|
||||
[InlineData(new string[] { "-s", "<source>" }, "/p:RestoreSources=<source>")]
|
||||
|
@ -30,19 +27,9 @@ namespace Microsoft.DotNet.Cli.MSBuild.Tests
|
|||
[InlineData(new string[] { "--no-cache" }, "/p:RestoreNoCache=true")]
|
||||
[InlineData(new string[] { "--ignore-failed-sources" }, "/p:RestoreIgnoreFailedSources=true")]
|
||||
[InlineData(new string[] { "--no-dependencies" }, "/p:RestoreRecursive=false")]
|
||||
public void MsbuildInvocationWithConsoleLoggerParametersIsCorrect(string[] args, string expectedAdditionalArgs)
|
||||
{
|
||||
expectedAdditionalArgs = (string.IsNullOrEmpty(expectedAdditionalArgs) ? "" : $" {expectedAdditionalArgs}");
|
||||
|
||||
var msbuildPath = "<msbuildpath>";
|
||||
RestoreCommand.FromArgs(args, msbuildPath)
|
||||
.GetProcessStartInfo().Arguments
|
||||
.Should().Be($"{ExpectedPrefixWithConsoleLoggerParamaters}{expectedAdditionalArgs}");
|
||||
}
|
||||
|
||||
[InlineData(new string[] { "-v", "minimal" }, @"/verbosity:minimal")]
|
||||
[InlineData(new string[] { "--verbosity", "minimal" }, @"/verbosity:minimal")]
|
||||
public void MsbuildInvocationWithVerbosityIsCorrect(string[] args, string expectedAdditionalArgs)
|
||||
public void MsbuildInvocationIsCorrect(string[] args, string expectedAdditionalArgs)
|
||||
{
|
||||
expectedAdditionalArgs = (string.IsNullOrEmpty(expectedAdditionalArgs) ? "" : $" {expectedAdditionalArgs}");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue