diff options
author | Matt Ward <matt.ward@xamarin.com> | 2015-07-29 20:29:05 +0300 |
---|---|---|
committer | Matt Ward <matt.ward@xamarin.com> | 2015-07-29 20:29:05 +0300 |
commit | 07953db18ed50cc547f92d7f95dfb6bc43973ff5 (patch) | |
tree | d6c32d384e24cffbdbe8c68f3d48587740b4fa43 /main/src/addins/MonoDevelop.PackageManagement | |
parent | 4fcbcd917742fc9a9858c03606e9c97492ddc219 (diff) |
[NuGet] Do not show status bar warnings about PowerShell scripts.
Fixed bug #32577 - Do not show warning in status bar about PowerShell
scripts when installing/updating a NuGet package
https://bugzilla.xamarin.com/show_bug.cgi?id=32577
Previously if a NuGet package had a PowerShell script the status bar
would indicate that the NuGet package had installed with warnings.
Now the warning is not displayed in the status bar. A warning will
still be logged in the Package Console.
Diffstat (limited to 'main/src/addins/MonoDevelop.PackageManagement')
4 files changed, 13 insertions, 13 deletions
diff --git a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Tests/MonoDevelop.PackageManagement.Tests/BackgroundPackageActionRunnerTests.cs b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Tests/MonoDevelop.PackageManagement.Tests/BackgroundPackageActionRunnerTests.cs index 1d8f5b7e51..9782a6df71 100644 --- a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Tests/MonoDevelop.PackageManagement.Tests/BackgroundPackageActionRunnerTests.cs +++ b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Tests/MonoDevelop.PackageManagement.Tests/BackgroundPackageActionRunnerTests.cs @@ -282,14 +282,14 @@ namespace MonoDevelop.PackageManagement.Tests }
[Test]
- public void Run_OneInstallActionWithPowerShellScripts_WarningReportedToProgressMonitor ()
+ public void Run_OneInstallActionWithPowerShellScripts_WarningNotReportedToProgressMonitor ()
{
CreateRunner ();
AddInstallActionWithPowerShellScript ();
Run ();
- Assert.AreEqual ("Warning", progressMonitor.ReportedWarningMessage);
+ Assert.IsNull (progressMonitor.ReportedWarningMessage);
}
[Test]
diff --git a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Tests/MonoDevelop.PackageManagement.Tests/InstallPackageActionTests.cs b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Tests/MonoDevelop.PackageManagement.Tests/InstallPackageActionTests.cs index b8261410a8..cb15dbdba3 100644 --- a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Tests/MonoDevelop.PackageManagement.Tests/InstallPackageActionTests.cs +++ b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Tests/MonoDevelop.PackageManagement.Tests/InstallPackageActionTests.cs @@ -484,7 +484,7 @@ namespace MonoDevelop.PackageManagement.Tests }
[Test]
- public void Execute_PackageBeingInstalledHasPowerShellScripts_WarningAboutPowerShellScriptsIsLogged ()
+ public void Execute_PackageBeingInstalledHasPowerShellScripts_MessageAboutPowerShellScriptsIsLogged ()
{
CreateAction ();
FakePackage expectedPackage = fakeProject.FakeSourceRepository.AddFakePackageWithVersion ("Test", "1.0");
@@ -493,16 +493,16 @@ namespace MonoDevelop.PackageManagement.Tests action.PackageId = expectedPackage.Id;
action.PackageVersion = expectedPackage.Version;
fakeProject.FakeInstallOperations.Add (operation);
- string messageLogged = null;
+ var messagesLogged = new List<string> ();
packageManagementEvents.PackageOperationMessageLogged += (sender, e) => {
- if (e.Message.Level == MessageLevel.Warning) {
- messageLogged = e.Message.ToString ();
+ if (e.Message.Level == MessageLevel.Info) {
+ messagesLogged.Add (e.Message.ToString ());
}
};
action.Execute ();
- Assert.AreEqual ("Test Package contains PowerShell scripts which will not be run.", messageLogged);
+ Assert.That (messagesLogged, Contains.Item ("Test Package contains PowerShell scripts which will not be run."));
}
[Test]
diff --git a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Tests/MonoDevelop.PackageManagement.Tests/UninstallPackageActionTests.cs b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Tests/MonoDevelop.PackageManagement.Tests/UninstallPackageActionTests.cs index 885c10c377..7f46a84639 100644 --- a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Tests/MonoDevelop.PackageManagement.Tests/UninstallPackageActionTests.cs +++ b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Tests/MonoDevelop.PackageManagement.Tests/UninstallPackageActionTests.cs @@ -246,22 +246,22 @@ namespace MonoDevelop.PackageManagement.Tests }
[Test]
- public void Execute_PackageHasPowerShellUninstallScript_PowerShellWarningLogged ()
+ public void Execute_PackageHasPowerShellUninstallScript_PowerShellInfoLogged ()
{
CreateAction ();
FakePackage package = FakePackage.CreatePackageWithVersion ("Test", "1.0");
action.Package = package;
package.AddFile (@"tools\uninstall.ps1");
- string messageLogged = null;
+ var messagesLogged = new List<string> ();
packageManagementEvents.PackageOperationMessageLogged += (sender, e) => {
- if (e.Message.Level == MessageLevel.Warning) {
- messageLogged = e.Message.ToString ();
+ if (e.Message.Level == MessageLevel.Info) {
+ messagesLogged.Add (e.Message.ToString ());
}
};
action.Execute ();
- Assert.AreEqual ("Test Package contains PowerShell scripts which will not be run.", messageLogged);
+ Assert.That (messagesLogged, Contains.Item ("Test Package contains PowerShell scripts which will not be run."));
}
[Test]
diff --git a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/ProcessPackageAction.cs b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/ProcessPackageAction.cs index fa01bc2a1a..81b0c8fb5c 100644 --- a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/ProcessPackageAction.cs +++ b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/ProcessPackageAction.cs @@ -141,7 +141,7 @@ namespace ICSharpCode.PackageManagement void ReportPowerShellScriptWarning ()
{
string message = GettextCatalog.GetString ("{0} Package contains PowerShell scripts which will not be run.", GetPackageId ());
- packageManagementEvents.OnPackageOperationMessageLogged (MessageLevel.Warning, message);
+ packageManagementEvents.OnPackageOperationMessageLogged (MessageLevel.Info, message);
}
void CheckLicenses ()
|