mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-05 02:22:31 +01:00
ignore WindowsService tests in *nix systems.
This commit is contained in:
parent
3cf527bfa2
commit
a4ee4a913f
@ -18,6 +18,11 @@ public class ServiceProviderTests : TestBase
|
|||||||
[SetUp]
|
[SetUp]
|
||||||
public void Setup()
|
public void Setup()
|
||||||
{
|
{
|
||||||
|
if(EnvironmentProvider.IsLinux)
|
||||||
|
{
|
||||||
|
throw new IgnoreException("Windows services aren't available in none-windows environments.");
|
||||||
|
}
|
||||||
|
|
||||||
serviceProvider = new ServiceProvider();
|
serviceProvider = new ServiceProvider();
|
||||||
|
|
||||||
if (serviceProvider.ServiceExist(TEMP_SERVICE_NAME))
|
if (serviceProvider.ServiceExist(TEMP_SERVICE_NAME))
|
||||||
|
@ -44,6 +44,15 @@ public static bool IsMono
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool IsLinux
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
int p = (int)Environment.OSVersion.Platform;
|
||||||
|
return (p == 4) || (p == 6) || (p == 128);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static bool IsDebug
|
public static bool IsDebug
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
Loading…
Reference in New Issue
Block a user