Fixed: Integration tests on Mono 5.12 and 5.14

Mono 5.12 and 5.14 has a bug that means RestSharp can't handle non-200
responses.  Fix status api call so tests start and disable the tests
that use non-200 responses on these mono versions
This commit is contained in:
ta264
2019-10-14 21:20:59 +01:00
committed by Qstick
parent 97de1b4622
commit 304382f406
7 changed files with 46 additions and 1 deletions

View File

@@ -162,6 +162,22 @@ namespace NzbDrone.Integration.Test
}
}
protected void IgnoreOnMonoVersions(params string[] version_strings)
{
if (!PlatformInfo.IsMono)
{
return;
}
var current = PlatformInfo.GetVersion();
var versions = version_strings.Select(x => new Version(x)).ToList();
if (versions.Any(x => x.Major == current.Major && x.Minor == current.Minor))
{
throw new IgnoreException($"Ignored on mono {PlatformInfo.GetVersion()}");
}
}
public string GetTempDirectory(params string[] args)
{
var path = Path.Combine(TempDirectory, Path.Combine(args));