mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
improved Linux support for tests.
This commit is contained in:
parent
660185640d
commit
3162e4864d
20 changed files with 178 additions and 149 deletions
|
@ -1,11 +1,11 @@
|
|||
using NUnit.Framework;
|
||||
|
||||
namespace NzbDrone.Test.Common
|
||||
namespace NzbDrone.Test.Common.Categories
|
||||
{
|
||||
public class IntegrationTestAttribute : CategoryAttribute
|
||||
{
|
||||
public IntegrationTestAttribute()
|
||||
: base("Integration Test")
|
||||
: base("IntegrationTest")
|
||||
{
|
||||
|
||||
}
|
|
@ -41,7 +41,10 @@ namespace NzbDrone.Test.Common
|
|||
[TearDown]
|
||||
public void LoggingDownBase()
|
||||
{
|
||||
ExceptionVerification.AssertNoUnexcpectedLogs();
|
||||
if (TestContext.CurrentContext.Result.Status == TestStatus.Passed)
|
||||
{
|
||||
ExceptionVerification.AssertNoUnexcpectedLogs();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
<Compile Include="AutoMoq\Unity\AutoMockingBuilderStrategy.cs" />
|
||||
<Compile Include="AutoMoq\Unity\AutoMockingContainerExtension.cs" />
|
||||
<Compile Include="ExceptionVerification.cs" />
|
||||
<Compile Include="IntegrationTest.cs" />
|
||||
<Compile Include="Categories\IntegrationTestAttribute.cs" />
|
||||
<Compile Include="LoggingTest.cs" />
|
||||
<Compile Include="MockerExtensions.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
|
|
|
@ -34,6 +34,7 @@ namespace NzbDrone.Test.Common
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public abstract class TestBase : LoggingTest
|
||||
|
@ -101,6 +102,20 @@ namespace NzbDrone.Test.Common
|
|||
catch (Exception)
|
||||
{
|
||||
}
|
||||
|
||||
if (TestContext.CurrentContext.Result.Status == TestStatus.Failed)
|
||||
{
|
||||
var testName = TestContext.CurrentContext.Test.Name.ToLower();
|
||||
|
||||
if (EnvironmentProvider.IsLinux && testName.Contains("windows"))
|
||||
{
|
||||
throw new IgnoreException("windows specific test");
|
||||
}
|
||||
else if (testName.Contains("linux"))
|
||||
{
|
||||
throw new IgnoreException("linux specific test");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void WithTempAsAppPath()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue