mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 20:12: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]
|
[Test]
|
||||||
[Platform("Mono")]
|
[Platform("Mono")]
|
||||||
public void should_return_ok_if_bsd()
|
public void should_return_ok_if_otherbsd()
|
||||||
{
|
{
|
||||||
Mocker.GetMock<IProcessProvider>()
|
Mocker.GetMock<IProcessProvider>()
|
||||||
.Setup(x => x.StartAndCapture("uname", null, null))
|
.Setup(x => x.StartAndCapture("uname", null, null))
|
||||||
@ -33,10 +33,26 @@ public void should_return_ok_if_bsd()
|
|||||||
{
|
{
|
||||||
Lines = new List<ProcessOutputLine>
|
Lines = new List<ProcessOutputLine>
|
||||||
{
|
{
|
||||||
new ProcessOutputLine(ProcessOutputLevel.Standard, "FreeBSD")
|
new ProcessOutputLine(ProcessOutputLevel.Standard, "OpenBSD")
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Subject.Check().ShouldBeOk();
|
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.Linq;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using NLog;
|
|
||||||
using NzbDrone.Common.EnvironmentInfo;
|
using NzbDrone.Common.EnvironmentInfo;
|
||||||
using NzbDrone.Common.Processes;
|
using NzbDrone.Common.Processes;
|
||||||
using NzbDrone.Core.Localization;
|
using NzbDrone.Core.Localization;
|
||||||
@ -9,17 +8,13 @@ namespace NzbDrone.Core.HealthCheck.Checks
|
|||||||
{
|
{
|
||||||
public class MonoNotNetCoreCheck : HealthCheckBase
|
public class MonoNotNetCoreCheck : HealthCheckBase
|
||||||
{
|
{
|
||||||
private static string[] MonoUnames = new string[] { "FreeBSD", "OpenBSD", "MidnightBSD", "NetBSD" };
|
private static string[] MonoUnames = new string[] { "OpenBSD", "MidnightBSD", "NetBSD" };
|
||||||
private readonly IOsInfo _osInfo;
|
|
||||||
private readonly IProcessProvider _processProvider;
|
private readonly IProcessProvider _processProvider;
|
||||||
|
|
||||||
public MonoNotNetCoreCheck(IOsInfo osInfo,
|
public MonoNotNetCoreCheck(IProcessProvider processProvider,
|
||||||
IProcessProvider processProvider,
|
ILocalizationService localizationService)
|
||||||
ILocalizationService localizationService,
|
|
||||||
Logger logger)
|
|
||||||
: base(localizationService)
|
: base(localizationService)
|
||||||
{
|
{
|
||||||
_osInfo = osInfo;
|
|
||||||
_processProvider = processProvider;
|
_processProvider = processProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,12 +25,6 @@ public override HealthCheck Check()
|
|||||||
return new HealthCheck(GetType());
|
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
|
// Don't warn on linux x86 - we don't build x86 net core
|
||||||
if (OsInfo.IsLinux && RuntimeInformation.ProcessArchitecture == Architecture.X86)
|
if (OsInfo.IsLinux && RuntimeInformation.ProcessArchitecture == Architecture.X86)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user