test: add unit test to validate all cardigann definitions (#8165)

* test: add unit test to validate all cardigann definitions

Error while parsing Cardigann definition 4thd.yml
YamlDotNet.Core.YamlException: (Line: 13, Col: 9, Idx: 240) - (Line: 13, Col: 9, Idx: 240): Exception during deserialization
 ---> System.Runtime.Serialization.SerializationException: Property 'dec' not found on type 'Jackett.Common.Models.CategorymappingBlock'.
This commit is contained in:
Diego Heras
2020-04-13 09:34:45 +02:00
committed by GitHub
parent 1cbc19823d
commit 47454e4c1e
5 changed files with 54 additions and 6 deletions

View File

@@ -69,7 +69,9 @@ namespace Jackett.Common.Services
{
try
{
processService.StartProcessAndLog(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath, "--MigrateSettings", true);
// Use EscapedCodeBase to avoid Uri reserved characters from causing bugs
// https://stackoverflow.com/questions/896572
processService.StartProcessAndLog(new Uri(Assembly.GetExecutingAssembly().EscapedCodeBase).LocalPath, "--MigrateSettings", true);
}
catch
{
@@ -164,7 +166,9 @@ namespace Jackett.Common.Services
}
}
public string ApplicationFolder() => Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath);
// Use EscapedCodeBase to avoid Uri reserved characters from causing bugs
// https://stackoverflow.com/questions/896572
public string ApplicationFolder() => Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().EscapedCodeBase).LocalPath);
public string GetContentFolder()
{
@@ -232,7 +236,7 @@ namespace Jackett.Common.Services
}
else
{
//We don't load these out of the config files as it could get confusing to users who accidently save.
//We don't load these out of the config files as it could get confusing to users who accidently save.
//In future we could flatten the serverconfig, and use command line parameters to override any configuration.
config.RuntimeSettings = runtimeSettings;
}