From 75371c4e728481becc144dec34dc6b7afd9dba28 Mon Sep 17 00:00:00 2001 From: Keivan Beigi Date: Mon, 26 Aug 2013 12:35:53 -0700 Subject: [PATCH] fixing Linux integration tests --- .../DiskProviderTests/FreeDiskSpaceFixture.cs | 5 +++-- NzbDrone.Integration.Test/NzbDroneRunner.cs | 10 +++++++++- NzbDrone.Integration.Test/RootFolderIntegrationTest.cs | 5 +++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/NzbDrone.Core.Test/ProviderTests/DiskProviderTests/FreeDiskSpaceFixture.cs b/NzbDrone.Core.Test/ProviderTests/DiskProviderTests/FreeDiskSpaceFixture.cs index 99c3f21b8..4584770ca 100644 --- a/NzbDrone.Core.Test/ProviderTests/DiskProviderTests/FreeDiskSpaceFixture.cs +++ b/NzbDrone.Core.Test/ProviderTests/DiskProviderTests/FreeDiskSpaceFixture.cs @@ -1,4 +1,5 @@ -using System.IO; +using System; +using System.IO; using FluentAssertions; using NUnit.Framework; using NzbDrone.Common; @@ -13,7 +14,7 @@ public class FreeDiskSpaceFixture : CoreTest [Test] public void should_return_free_disk_space() { - var result = Subject.GetAvilableSpace(Directory.GetCurrentDirectory()); + var result = Subject.GetAvilableSpace(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)); result.Should().BeGreaterThan(0); } diff --git a/NzbDrone.Integration.Test/NzbDroneRunner.cs b/NzbDrone.Integration.Test/NzbDroneRunner.cs index 5e16a39b1..988c47278 100644 --- a/NzbDrone.Integration.Test/NzbDroneRunner.cs +++ b/NzbDrone.Integration.Test/NzbDroneRunner.cs @@ -26,6 +26,14 @@ public void Start() { AppDate = Path.Combine(Directory.GetCurrentDirectory(), "_intg_" + DateTime.Now.Ticks); + var nzbdroneConsoleExe = "NzbDrone.Console.exe"; + + if (OsInfo.IsMono) + { + nzbdroneConsoleExe = "NzbDrone.exe"; + } + + if (BuildInfo.IsDebug) { @@ -33,7 +41,7 @@ public void Start() } else { - Start(Path.Combine("bin","NzbDrone.Console.exe")); + Start(Path.Combine("bin", nzbdroneConsoleExe)); } while (true) diff --git a/NzbDrone.Integration.Test/RootFolderIntegrationTest.cs b/NzbDrone.Integration.Test/RootFolderIntegrationTest.cs index d4cc4bc83..cd1b29cf0 100644 --- a/NzbDrone.Integration.Test/RootFolderIntegrationTest.cs +++ b/NzbDrone.Integration.Test/RootFolderIntegrationTest.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.IO; using FluentAssertions; using Microsoft.AspNet.SignalR.Client; @@ -42,7 +43,7 @@ public void should_have_no_root_folder_initially() var rootFolder = new RootFolderResource { - Path = Directory.GetCurrentDirectory() + Path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) }; var postResponse = RootFolders.Post(rootFolder);