Mono NzbDrone processes are more restricted

This commit is contained in:
Mark McDowall 2014-02-10 11:59:00 -08:00
parent 4d3217432c
commit f5d85b8f57
3 changed files with 2 additions and 33 deletions

View File

@ -73,7 +73,6 @@
<Compile Include="EnvironmentProviderTest.cs" />
<Compile Include="ProcessProviderTests.cs" />
<Compile Include="ReflectionTests\ReflectionExtensionFixture.cs" />
<Compile Include="ServiceFactoryFixture.cs" />
<Compile Include="ServiceProviderTests.cs" />
<Compile Include="WebClientTests.cs" />
</ItemGroup>

View File

@ -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<ServiceFactory>
{
[SetUp]
public void setup()
{
Mocker.SetConstant(MainAppContainerBuilder.BuildContainer(new StartupContext()));
}
[Test]
public void event_handlers_should_be_unique()
{
var handlers = Subject.BuildAll<IHandle<ApplicationShutdownRequested>>()
.Select(c => c.GetType().FullName);
handlers.Should().OnlyHaveUniqueItems();
}
}
}

View File

@ -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();
}
}