New: Errors for Mono Health checks on X86 and BSD (except FreeBSD) based Operating Systems

This commit is contained in:
Robin Dadswell 2021-05-07 00:24:57 +01:00
parent 5696fa2efe
commit 9f6c48191b
3 changed files with 7 additions and 5 deletions

View File

@ -35,7 +35,7 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks
[Test]
[Platform("Mono")]
public void should_return_ok_if_otherbsd()
public void should_return_error_if_otherbsd()
{
Mocker.GetMock<IProcessProvider>()
.Setup(x => x.StartAndCapture("uname", null, null))
@ -46,7 +46,7 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks
new ProcessOutputLine(ProcessOutputLevel.Standard, "OpenBSD")
}
});
Subject.Check().ShouldBeOk();
Subject.Check().ShouldBeError();
}
[Test]

View File

@ -28,14 +28,14 @@ namespace NzbDrone.Core.HealthCheck.Checks
// Don't warn on linux x86 - we don't build x86 net core
if (OsInfo.IsLinux && RuntimeInformation.ProcessArchitecture == Architecture.X86)
{
return new HealthCheck(GetType());
return new HealthCheck(GetType(), HealthCheckResult.Error, _localizationService.GetLocalizedString("Monox86SupportCheckMessage"), "mono_support_end_of_life");
}
// Check for BSD
var output = _processProvider.StartAndCapture("uname");
if (output?.ExitCode == 0 && MonoUnames.Contains(output?.Lines.First().Content))
{
return new HealthCheck(GetType());
return new HealthCheck(GetType(), HealthCheckResult.Error, string.Format(_localizationService.GetLocalizedString("MonoBSDSupportCheckMessage"), OsInfo.Os), "mono_support_end_of_life");
}
return new HealthCheck(GetType(),

View File

@ -529,7 +529,9 @@
"MonitoredOnly": "Monitored Only",
"MonitoredStatus": "Monitored/Status",
"MonitorMovie": "Monitor Movie",
"MonoNotNetCoreCheckMessage": "Please upgrade to the .NET Core version of Radarr, Mono versions will not be supported in the next release. ",
"Monox86SupportCheckMessage": "The current operating system is 32 bit, this will not be supported in the next release of Radarr.",
"MonoBSDSupportCheckMessage": "The operating system {0} will not be supported in the next release of Radarr.",
"MonoNotNetCoreCheckMessage": "Please upgrade to the .NET Core version of Radarr, Mono versions will not be supported in the next release.",
"MonoTlsCheckMessage": "Radarr Mono 4.x tls workaround still enabled, consider removing MONO_TLS_PROVIDER=legacy environment option",
"MonoVersion": "Mono Version",
"MonoVersionCheckNotSupportedMessage": "Currently installed Mono version {0} is no longer supported. Please upgrade Mono to version {1}.",