fixup UpdateService tests

This commit is contained in:
Qstick 2022-10-15 20:46:10 -05:00
parent 47116ea663
commit 88e993001b
2 changed files with 7 additions and 7 deletions

View File

@ -279,7 +279,7 @@ namespace NzbDrone.Common.Test
[Test] [Test]
public void GetUpdateClientExePath() 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] [Test]

View File

@ -69,7 +69,7 @@ namespace NzbDrone.Core.Test.UpdateTests
.Returns(true); .Returns(true);
Mocker.GetMock<IDiskProvider>() Mocker.GetMock<IDiskProvider>()
.Setup(v => v.FileExists(It.Is<string>(s => s.EndsWith("Sonarr.Update.exe")))) .Setup(v => v.FileExists(It.Is<string>(s => s.EndsWith("Sonarr.Update".ProcessNameToExe()))))
.Returns(true); .Returns(true);
_sandboxFolder = Mocker.GetMock<IAppFolderInfo>().Object.GetUpdateSandboxFolder(); _sandboxFolder = Mocker.GetMock<IAppFolderInfo>().Object.GetUpdateSandboxFolder();
@ -154,7 +154,7 @@ namespace NzbDrone.Core.Test.UpdateTests
public void should_return_with_warning_if_updater_doesnt_exists() public void should_return_with_warning_if_updater_doesnt_exists()
{ {
Mocker.GetMock<IDiskProvider>() Mocker.GetMock<IDiskProvider>()
.Setup(v => v.FileExists(It.Is<string>(s => s.EndsWith("Sonarr.Update.exe")))) .Setup(v => v.FileExists(It.Is<string>(s => s.EndsWith("Sonarr.Update".ProcessNameToExe()))))
.Returns(false); .Returns(false);
Subject.Execute(new ApplicationUpdateCommand()); Subject.Execute(new ApplicationUpdateCommand());
@ -186,7 +186,7 @@ namespace NzbDrone.Core.Test.UpdateTests
} }
[Test] [Test]
[Platform("Mono")] [Platform(Exclude = "Win")]
public void should_run_script_if_configured() public void should_run_script_if_configured()
{ {
const string scriptPath = "/tmp/nzbdrone/update.sh"; const string scriptPath = "/tmp/nzbdrone/update.sh";
@ -199,7 +199,7 @@ namespace NzbDrone.Core.Test.UpdateTests
} }
[Test] [Test]
[Platform("Mono")] [Platform(Exclude = "Win")]
public void should_throw_if_script_is_not_set() public void should_throw_if_script_is_not_set()
{ {
const string scriptPath = "/tmp/nzbdrone/update.sh"; const string scriptPath = "/tmp/nzbdrone/update.sh";
@ -213,7 +213,7 @@ namespace NzbDrone.Core.Test.UpdateTests
} }
[Test] [Test]
[Platform("Mono")] [Platform(Exclude = "Win")]
public void should_throw_if_script_is_null() public void should_throw_if_script_is_null()
{ {
const string scriptPath = "/tmp/nzbdrone/update.sh"; const string scriptPath = "/tmp/nzbdrone/update.sh";
@ -227,7 +227,7 @@ namespace NzbDrone.Core.Test.UpdateTests
} }
[Test] [Test]
[Platform("Mono")] [Platform(Exclude = "Win")]
public void should_throw_if_script_path_does_not_exist() public void should_throw_if_script_path_does_not_exist()
{ {
const string scriptPath = "/tmp/nzbdrone/update.sh"; const string scriptPath = "/tmp/nzbdrone/update.sh";