This repository was archived by the owner on Jan 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/System.IO.Pipes/tests/NamedPipeTests Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -124,6 +124,10 @@ public void RunImpersonated(Action action)
124124 /// </summary>
125125 public class NamedPipeTest_CurrentUserOnly_Windows : NamedPipeTestBase , IClassFixture < TestAccountImpersonator >
126126 {
127+ public static bool IsAdminOnSupportedWindowsVersions => PlatformDetection . IsWindowsAndElevated
128+ && ! PlatformDetection . IsWindows7
129+ && ! PlatformDetection . IsWindowsNanoServer ;
130+
127131 private TestAccountImpersonator _testAccountImpersonator ;
128132
129133 public NamedPipeTest_CurrentUserOnly_Windows ( TestAccountImpersonator testAccountImpersonator )
@@ -132,7 +136,7 @@ public NamedPipeTest_CurrentUserOnly_Windows(TestAccountImpersonator testAccount
132136 }
133137
134138 [ OuterLoop ]
135- [ ConditionalTheory ( typeof ( PlatformDetection ) , nameof ( PlatformDetection . IsWindowsAndElevated ) ) ]
139+ [ ConditionalTheory ( nameof ( IsAdminOnSupportedWindowsVersions ) ) ]
136140 [ InlineData ( PipeOptions . None , PipeOptions . CurrentUserOnly ) ]
137141 [ InlineData ( PipeOptions . CurrentUserOnly , PipeOptions . None ) ]
138142 public void Connection_UnderDifferentUser_SingleSide_CurrentUserOnly_Fails ( PipeOptions serverPipeOptions , PipeOptions clientPipeOptions )
You can’t perform that action at this time.
0 commit comments