mirror of
https://github.com/Readarr/Readarr
synced 2025-12-25 09:47:14 +01:00
Removed Nyaa Integration tests and increased logging detail during integration tests.
This commit is contained in:
parent
59b40bd032
commit
84f707c51b
3 changed files with 7 additions and 34 deletions
|
|
@ -18,6 +18,7 @@ public class HostConfigResource : RestResource
|
|||
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 @@ public static HostConfigResource ToResource(this IConfigFileProvider model, ICon
|
|||
//Username
|
||||
//Password
|
||||
LogLevel = model.LogLevel,
|
||||
ConsoleLogLevel = model.ConsoleLogLevel,
|
||||
Branch = model.Branch,
|
||||
ApiKey = model.ApiKey,
|
||||
SslCertHash = model.SslCertHash,
|
||||
|
|
|
|||
|
|
@ -28,40 +28,6 @@ public void SetUp()
|
|||
};
|
||||
}
|
||||
|
||||
[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(_albumSearchCriteria);
|
||||
|
||||
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));
|
||||
|
|
|
|||
|
|
@ -36,6 +36,11 @@ protected override void InitializeTestTarget()
|
|||
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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue