Lidarr/src/NzbDrone.Integration.Test/IntegrationTest.cs

47 lines
1.4 KiB
C#
Raw Normal View History

2013-11-13 20:08:37 +00:00
using NLog;
2017-02-21 16:03:10 +00:00
using NzbDrone.Core.Indexers.Newznab;
2013-11-12 03:25:54 +00:00
using NzbDrone.Test.Common;
2017-09-04 02:20:56 +00:00
using Lidarr.Http.ClientSchema;
namespace NzbDrone.Integration.Test
{
public abstract class IntegrationTest : IntegrationTestBase
{
2016-07-31 21:40:07 +00:00
protected NzbDroneRunner _runner;
2013-11-13 20:08:37 +00:00
public override string ArtistRootFolder => GetTempDirectory("ArtistRootFolder");
2013-08-14 03:22:28 +00:00
2017-03-31 18:55:07 +00:00
protected override string RootUrl => "http://localhost:8686/";
2013-08-14 05:02:25 +00:00
2016-12-09 06:54:15 +00:00
protected override string ApiKey => _runner.ApiKey;
2013-08-14 05:02:25 +00:00
protected override void StartTestTarget()
{
2014-12-17 07:12:26 +00:00
_runner = new NzbDroneRunner(LogManager.GetCurrentClassLogger());
2013-08-14 03:22:28 +00:00
_runner.KillAll();
2013-08-14 03:22:28 +00:00
_runner.Start();
}
protected override void InitializeTestTarget()
{
2017-10-31 01:28:29 +00:00
Indexers.Post(new Lidarr.Api.V1.Indexers.IndexerResource
{
2017-02-21 16:03:10 +00:00
EnableRss = false,
EnableInteractiveSearch = false,
EnableAutomaticSearch = false,
2017-02-21 16:03:10 +00:00
ConfigContract = nameof(NewznabSettings),
Implementation = nameof(Newznab),
Name = "NewznabTest",
Protocol = Core.Indexers.DownloadProtocol.Usenet,
2017-09-04 02:20:56 +00:00
Fields = SchemaBuilder.ToSchema(new NewznabSettings())
});
}
protected override void StopTestTarget()
{
2013-08-14 03:22:28 +00:00
_runner.KillAll();
}
}
}