From 88e993001b4c22d3be4585b74a587bd3bab0d513 Mon Sep 17 00:00:00 2001 From: Qstick Date: Sat, 15 Oct 2022 20:46:10 -0500 Subject: [PATCH] fixup UpdateService tests --- src/NzbDrone.Common.Test/PathExtensionFixture.cs | 2 +- .../UpdateTests/UpdateServiceFixture.cs | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/NzbDrone.Common.Test/PathExtensionFixture.cs b/src/NzbDrone.Common.Test/PathExtensionFixture.cs index 53844aad4..7d9b3497a 100644 --- a/src/NzbDrone.Common.Test/PathExtensionFixture.cs +++ b/src/NzbDrone.Common.Test/PathExtensionFixture.cs @@ -279,7 +279,7 @@ namespace NzbDrone.Common.Test [Test] public void GetUpdateClientExePath() { - GetIAppDirectoryInfo().GetUpdateClientExePath().Should().BeEquivalentTo(@"C:\Temp\sonarr_update\Sonarr.Update.exe".AsOsAgnostic()); + GetIAppDirectoryInfo().GetUpdateClientExePath().Should().BeEquivalentTo(@"C:\Temp\sonarr_update\Sonarr.Update".AsOsAgnostic().ProcessNameToExe()); } [Test] diff --git a/src/NzbDrone.Core.Test/UpdateTests/UpdateServiceFixture.cs b/src/NzbDrone.Core.Test/UpdateTests/UpdateServiceFixture.cs index 48a2716f9..cdcae45fd 100644 --- a/src/NzbDrone.Core.Test/UpdateTests/UpdateServiceFixture.cs +++ b/src/NzbDrone.Core.Test/UpdateTests/UpdateServiceFixture.cs @@ -69,7 +69,7 @@ namespace NzbDrone.Core.Test.UpdateTests .Returns(true); Mocker.GetMock() - .Setup(v => v.FileExists(It.Is(s => s.EndsWith("Sonarr.Update.exe")))) + .Setup(v => v.FileExists(It.Is(s => s.EndsWith("Sonarr.Update".ProcessNameToExe())))) .Returns(true); _sandboxFolder = Mocker.GetMock().Object.GetUpdateSandboxFolder(); @@ -154,7 +154,7 @@ namespace NzbDrone.Core.Test.UpdateTests public void should_return_with_warning_if_updater_doesnt_exists() { Mocker.GetMock() - .Setup(v => v.FileExists(It.Is(s => s.EndsWith("Sonarr.Update.exe")))) + .Setup(v => v.FileExists(It.Is(s => s.EndsWith("Sonarr.Update".ProcessNameToExe())))) .Returns(false); Subject.Execute(new ApplicationUpdateCommand()); @@ -186,7 +186,7 @@ namespace NzbDrone.Core.Test.UpdateTests } [Test] - [Platform("Mono")] + [Platform(Exclude = "Win")] public void should_run_script_if_configured() { const string scriptPath = "/tmp/nzbdrone/update.sh"; @@ -199,7 +199,7 @@ namespace NzbDrone.Core.Test.UpdateTests } [Test] - [Platform("Mono")] + [Platform(Exclude = "Win")] public void should_throw_if_script_is_not_set() { const string scriptPath = "/tmp/nzbdrone/update.sh"; @@ -213,7 +213,7 @@ namespace NzbDrone.Core.Test.UpdateTests } [Test] - [Platform("Mono")] + [Platform(Exclude = "Win")] public void should_throw_if_script_is_null() { const string scriptPath = "/tmp/nzbdrone/update.sh"; @@ -227,7 +227,7 @@ namespace NzbDrone.Core.Test.UpdateTests } [Test] - [Platform("Mono")] + [Platform(Exclude = "Win")] public void should_throw_if_script_path_does_not_exist() { const string scriptPath = "/tmp/nzbdrone/update.sh";