mirror of
https://github.com/Radarr/Radarr.git
synced 2024-08-18 16:29:41 +02:00
Prompt upgrade to mono version on DSM and FreeBSD
This commit is contained in:
parent
e9ece8a319
commit
cc466b9e5b
@ -25,7 +25,7 @@ public void should_log_warning_if_mono()
|
||||
|
||||
[Test]
|
||||
[Platform("Mono")]
|
||||
public void should_return_ok_if_bsd()
|
||||
public void should_return_ok_if_otherbsd()
|
||||
{
|
||||
Mocker.GetMock<IProcessProvider>()
|
||||
.Setup(x => x.StartAndCapture("uname", null, null))
|
||||
@ -33,10 +33,26 @@ public void should_return_ok_if_bsd()
|
||||
{
|
||||
Lines = new List<ProcessOutputLine>
|
||||
{
|
||||
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<IProcessProvider>()
|
||||
.Setup(x => x.StartAndCapture("uname", null, null))
|
||||
.Returns(new ProcessOutput
|
||||
{
|
||||
Lines = new List<ProcessOutputLine>
|
||||
{
|
||||
new ProcessOutputLine(ProcessOutputLevel.Standard, "FreeBSD")
|
||||
}
|
||||
});
|
||||
Subject.Check().ShouldBeWarning();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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 @@ public override HealthCheck Check()
|
||||
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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user