mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-18 21:34:28 -04:00
Added some update APIs to check for updates and download and extract the update package.
Todo: apply updated, UI.
This commit is contained in:
@@ -4,6 +4,7 @@ using NLog;
|
||||
using NLog.Config;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Core;
|
||||
using NzbDrone.Core.Providers;
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
|
||||
[SetUpFixture]
|
||||
@@ -20,7 +21,7 @@ public class Fixtures
|
||||
{
|
||||
try
|
||||
{
|
||||
LogManager.Configuration = new XmlLoggingConfiguration(Path.Combine(CentralDispatch.AppPath, "log.config"), false);
|
||||
LogManager.Configuration = new XmlLoggingConfiguration(Path.Combine(new EnviromentProvider().AppPath, "log.config"), false);
|
||||
LogManager.ThrowExceptions = true;
|
||||
|
||||
var exceptionVerification = new ExceptionVerification();
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using NUnit.Framework;
|
||||
using System.IO;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Core.Providers.Jobs;
|
||||
|
||||
namespace NzbDrone.Core.Test.Framework
|
||||
@@ -11,8 +12,10 @@ namespace NzbDrone.Core.Test.Framework
|
||||
public void Setup()
|
||||
{
|
||||
ExceptionVerification.Reset();
|
||||
|
||||
|
||||
if (Directory.Exists(TempFolder))
|
||||
{
|
||||
Directory.Delete(TempFolder, true);
|
||||
}
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
@@ -22,5 +25,20 @@ namespace NzbDrone.Core.Test.Framework
|
||||
ExceptionVerification.AssertNoUnexcpectedLogs();
|
||||
}
|
||||
|
||||
|
||||
protected string TempFolder
|
||||
{
|
||||
get { return Path.Combine(Directory.GetCurrentDirectory(), "_temp"); }
|
||||
}
|
||||
|
||||
protected string GetTestFilePath(string fileName)
|
||||
{
|
||||
return Path.Combine(@".\Files\", fileName);
|
||||
}
|
||||
|
||||
protected string ReadTestFile(string fileName)
|
||||
{
|
||||
return File.ReadAllText(GetTestFilePath(fileName));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user