mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-26 01:37:07 +00:00
Removed Nyaa Integration tests and increased logging detail during integration tests.
This commit is contained in:
parent
02c64ad3a5
commit
7b159c1e63
4 changed files with 9 additions and 34 deletions
|
@ -18,6 +18,7 @@ namespace NzbDrone.Api.Config
|
|||
public string Username { get; set; }
|
||||
public string Password { get; set; }
|
||||
public string LogLevel { get; set; }
|
||||
public string ConsoleLogLevel { get; set; }
|
||||
public string Branch { get; set; }
|
||||
public string ApiKey { get; set; }
|
||||
public string SslCertHash { get; set; }
|
||||
|
@ -55,6 +56,7 @@ namespace NzbDrone.Api.Config
|
|||
//Username
|
||||
//Password
|
||||
LogLevel = model.LogLevel,
|
||||
ConsoleLogLevel = model.ConsoleLogLevel,
|
||||
Branch = model.Branch,
|
||||
ApiKey = model.ApiKey,
|
||||
SslCertHash = model.SslCertHash,
|
||||
|
|
|
@ -38,40 +38,6 @@ namespace NzbDrone.Core.Test.IndexerTests.IntegrationTests
|
|||
};
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void nyaa_fetch_recent()
|
||||
{
|
||||
var indexer = Mocker.Resolve<Nyaa>();
|
||||
|
||||
indexer.Definition = new IndexerDefinition
|
||||
{
|
||||
Name = "MyIndexer",
|
||||
Settings = new NyaaSettings()
|
||||
};
|
||||
|
||||
var result = indexer.FetchRecent();
|
||||
|
||||
ValidateTorrentResult(result, hasSize: true);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void nyaa_search_single()
|
||||
{
|
||||
var indexer = Mocker.Resolve<Nyaa>();
|
||||
|
||||
indexer.Definition = new IndexerDefinition
|
||||
{
|
||||
Name = "MyIndexer",
|
||||
Settings = new NyaaSettings()
|
||||
};
|
||||
|
||||
var result = indexer.Fetch(_animeSearchCriteria);
|
||||
|
||||
ValidateTorrentResult(result, hasSize: true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void ValidateTorrentResult(IList<ReleaseInfo> reports, bool hasSize = false, bool hasInfoUrl = false, bool hasMagnet = false)
|
||||
{
|
||||
reports.Should().OnlyContain(c => c.GetType() == typeof(TorrentInfo));
|
||||
|
|
|
@ -35,6 +35,11 @@ namespace NzbDrone.Integration.Test
|
|||
Protocol = Core.Indexers.DownloadProtocol.Usenet,
|
||||
Fields = SchemaBuilder.ToSchema(new NewznabSettings())
|
||||
});
|
||||
|
||||
// Change Console Log Level to Debug so we get more details.
|
||||
var config = HostConfig.Get(1);
|
||||
config.ConsoleLogLevel = "Debug";
|
||||
HostConfig.Put(config);
|
||||
}
|
||||
|
||||
protected override void StopTestTarget()
|
||||
|
|
|
@ -18,6 +18,7 @@ namespace Sonarr.Api.V3.Config
|
|||
public string Username { get; set; }
|
||||
public string Password { get; set; }
|
||||
public string LogLevel { get; set; }
|
||||
public string ConsoleLogLevel { get; set; }
|
||||
public string Branch { get; set; }
|
||||
public string ApiKey { get; set; }
|
||||
public string SslCertHash { get; set; }
|
||||
|
@ -55,6 +56,7 @@ namespace Sonarr.Api.V3.Config
|
|||
//Username
|
||||
//Password
|
||||
LogLevel = model.LogLevel,
|
||||
ConsoleLogLevel = model.ConsoleLogLevel,
|
||||
Branch = model.Branch,
|
||||
ApiKey = model.ApiKey,
|
||||
SslCertHash = model.SslCertHash,
|
||||
|
|
Loading…
Reference in a new issue