From f5d85b8f574dfcce2258acbf5d808954a75bad90 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Mon, 10 Feb 2014 11:59:00 -0800 Subject: [PATCH] Mono NzbDrone processes are more restricted --- .../NzbDrone.Common.Test.csproj | 1 - .../ServiceFactoryFixture.cs | 30 ------------------- src/NzbDrone.Mono/NzbDroneProcessProvider.cs | 4 +-- 3 files changed, 2 insertions(+), 33 deletions(-) delete mode 100644 src/NzbDrone.Common.Test/ServiceFactoryFixture.cs diff --git a/src/NzbDrone.Common.Test/NzbDrone.Common.Test.csproj b/src/NzbDrone.Common.Test/NzbDrone.Common.Test.csproj index e59fb8bf9..80c3a159e 100644 --- a/src/NzbDrone.Common.Test/NzbDrone.Common.Test.csproj +++ b/src/NzbDrone.Common.Test/NzbDrone.Common.Test.csproj @@ -73,7 +73,6 @@ - diff --git a/src/NzbDrone.Common.Test/ServiceFactoryFixture.cs b/src/NzbDrone.Common.Test/ServiceFactoryFixture.cs deleted file mode 100644 index 157d0893d..000000000 --- a/src/NzbDrone.Common.Test/ServiceFactoryFixture.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System.Linq; -using FluentAssertions; -using NUnit.Framework; -using NzbDrone.Common.EnvironmentInfo; -using NzbDrone.Core.Lifecycle; -using NzbDrone.Core.Messaging.Events; -using NzbDrone.Host; -using NzbDrone.Test.Common; - -namespace NzbDrone.Common.Test -{ - [TestFixture] - public class ServiceFactoryFixture : TestBase - { - [SetUp] - public void setup() - { - Mocker.SetConstant(MainAppContainerBuilder.BuildContainer(new StartupContext())); - } - - [Test] - public void event_handlers_should_be_unique() - { - var handlers = Subject.BuildAll>() - .Select(c => c.GetType().FullName); - - handlers.Should().OnlyHaveUniqueItems(); - } - } -} \ No newline at end of file diff --git a/src/NzbDrone.Mono/NzbDroneProcessProvider.cs b/src/NzbDrone.Mono/NzbDroneProcessProvider.cs index 147efb5b8..630b6e665 100644 --- a/src/NzbDrone.Mono/NzbDroneProcessProvider.cs +++ b/src/NzbDrone.Mono/NzbDroneProcessProvider.cs @@ -23,8 +23,8 @@ namespace NzbDrone.Mono { var processArgs = _processProvider.StartAndCapture("ps", String.Format("--pid {0} -o args=", c.Id)); - return processArgs.Standard.Any(p => p.Contains(ProcessProvider.NZB_DRONE_PROCESS_NAME) || - p.Contains(ProcessProvider.NZB_DRONE_CONSOLE_PROCESS_NAME)); + return processArgs.Standard.Any(p => p.Contains(ProcessProvider.NZB_DRONE_PROCESS_NAME + ".exe") || + p.Contains(ProcessProvider.NZB_DRONE_CONSOLE_PROCESS_NAME + ".exe")); }).ToList(); } }