Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corefx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaulo Janotti <pauloja@microsoft.com>2017-10-28 00:27:06 +0300
committerDan Moseley <danmose@microsoft.com>2017-10-28 00:27:06 +0300
commitb94869b1c55b17361f3931da1274e4b58f2a18e6 (patch)
tree2dca30bb86d086742abf404c3aae249383504cee /src
parent46ea605b5df6a3fe4ac635a426e31488c30c64b0 (diff)
Skip one wmi test in Win Server Core (#24927)
The test requires notepad.exe and that is not available on Win Server Core. Fixes #24912.
Diffstat (limited to 'src')
-rw-r--r--src/System.Management/tests/System/Management/ManagementObjectTests.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/System.Management/tests/System/Management/ManagementObjectTests.cs b/src/System.Management/tests/System/Management/ManagementObjectTests.cs
index 1d28da4100..d74aba2050 100644
--- a/src/System.Management/tests/System/Management/ManagementObjectTests.cs
+++ b/src/System.Management/tests/System/Management/ManagementObjectTests.cs
@@ -8,6 +8,9 @@ namespace System.Management.Tests
{
public class ManagementObjectTests
{
+ // Need a specific condition for the test requiring notepad since not all windows versions that support WMI have it
+ public static bool IsWmiSupportedAndHasNotepad => WmiTestHelper.IsWmiSupported && PlatformDetection.IsNotWindowsServerCore;
+
[ConditionalFact(typeof(WmiTestHelper), nameof(WmiTestHelper.IsWmiSupported))]
public void Get_Win32_LogicalDisk()
{
@@ -48,7 +51,7 @@ namespace System.Management.Tests
}
}
- [ConditionalFact(typeof(WmiTestHelper), nameof(WmiTestHelper.IsWmiSupported))]
+ [ConditionalFact(nameof(IsWmiSupportedAndHasNotepad))]
[OuterLoop]
public void Invoke_Instance_And_Static_Method_Win32_Process()
{