diff --git a/src/NzbDrone.Core.Test/HealthCheck/Checks/MonoNotNetCoreCheckFixture.cs b/src/NzbDrone.Core.Test/HealthCheck/Checks/MonoNotNetCoreCheckFixture.cs index 991040b35..bb4ba066c 100644 --- a/src/NzbDrone.Core.Test/HealthCheck/Checks/MonoNotNetCoreCheckFixture.cs +++ b/src/NzbDrone.Core.Test/HealthCheck/Checks/MonoNotNetCoreCheckFixture.cs @@ -25,7 +25,7 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks [Test] [Platform("Mono")] - public void should_return_ok_if_bsd() + public void should_return_ok_if_otherbsd() { Mocker.GetMock() .Setup(x => x.StartAndCapture("uname", null, null)) @@ -33,10 +33,26 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks { Lines = new List { - new ProcessOutputLine(ProcessOutputLevel.Standard, "FreeBSD") + new ProcessOutputLine(ProcessOutputLevel.Standard, "OpenBSD") } }); Subject.Check().ShouldBeOk(); } + + [Test] + [Platform("Mono")] + public void should_log_warning_if_freebsd() + { + Mocker.GetMock() + .Setup(x => x.StartAndCapture("uname", null, null)) + .Returns(new ProcessOutput + { + Lines = new List + { + new ProcessOutputLine(ProcessOutputLevel.Standard, "FreeBSD") + } + }); + Subject.Check().ShouldBeWarning(); + } } } diff --git a/src/NzbDrone.Core/HealthCheck/Checks/MonoNotNetCoreCheck.cs b/src/NzbDrone.Core/HealthCheck/Checks/MonoNotNetCoreCheck.cs index b74ee377a..da257b8d7 100644 --- a/src/NzbDrone.Core/HealthCheck/Checks/MonoNotNetCoreCheck.cs +++ b/src/NzbDrone.Core/HealthCheck/Checks/MonoNotNetCoreCheck.cs @@ -1,6 +1,5 @@ using System.Linq; using System.Runtime.InteropServices; -using NLog; using NzbDrone.Common.EnvironmentInfo; using NzbDrone.Common.Processes; using NzbDrone.Core.Localization; @@ -9,17 +8,13 @@ namespace NzbDrone.Core.HealthCheck.Checks { public class MonoNotNetCoreCheck : HealthCheckBase { - private static string[] MonoUnames = new string[] { "FreeBSD", "OpenBSD", "MidnightBSD", "NetBSD" }; - private readonly IOsInfo _osInfo; + private static string[] MonoUnames = new string[] { "OpenBSD", "MidnightBSD", "NetBSD" }; private readonly IProcessProvider _processProvider; - public MonoNotNetCoreCheck(IOsInfo osInfo, - IProcessProvider processProvider, - ILocalizationService localizationService, - Logger logger) + public MonoNotNetCoreCheck(IProcessProvider processProvider, + ILocalizationService localizationService) : base(localizationService) { - _osInfo = osInfo; _processProvider = processProvider; } @@ -30,12 +25,6 @@ namespace NzbDrone.Core.HealthCheck.Checks return new HealthCheck(GetType()); } - // Don't warn on arm based synology - could be arm5 or something else rubbish - if (_osInfo.Name == "DSM" && RuntimeInformation.ProcessArchitecture == Architecture.Arm) - { - return new HealthCheck(GetType()); - } - // Don't warn on linux x86 - we don't build x86 net core if (OsInfo.IsLinux && RuntimeInformation.ProcessArchitecture == Architecture.X86) {