Skip to content

Commit 34c0472

Browse files
authored
disable NTLM tests on RedHat.7 (#83559)
* disable NTLM tests on RedHat.7 * Package_Unsupported_NTLM
1 parent dc5a6c8 commit 34c0472

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/libraries/Common/tests/System/Net/Capability.Security.Unix.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public static bool IsNtlmInstalled()
99
{
1010
// GSS on Linux does not work with OpenSSL 3.0. Fix was submitted to gss-ntlm but it will take a while to make to
1111
// all supported distributions. The second part of the check should be removed when it does.
12-
return Interop.NetSecurityNative.IsNtlmInstalled() && (!PlatformDetection.IsOpenSslSupported || PlatformDetection.OpenSslVersion.Major < 3);
12+
return Interop.NetSecurityNative.IsNtlmInstalled() && (!PlatformDetection.IsOpenSslSupported || PlatformDetection.OpenSslVersion.Major < 3) && !PlatformDetection.IsRedHatFamily7;
1313
}
1414
}
1515
}

src/libraries/System.Net.Security/tests/UnitTests/NegotiateAuthenticationTests.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
using System.Security.Principal;
1111
using System.Text;
1212
using System.Threading.Tasks;
13+
using Microsoft.DotNet.XUnitExtensions;
1314
using Xunit;
1415

1516
namespace System.Net.Security.Tests
@@ -86,6 +87,10 @@ public void Package_Supported_NTLM()
8687
[ConditionalFact(nameof(IsNtlmUnavailable))]
8788
public void Package_Unsupported_NTLM()
8889
{
90+
if (PlatformDetection.IsRedHatFamily7)
91+
{
92+
throw new SkipTestException("https://github.com/dotnet/runtime/issues/83540");
93+
}
8994
NegotiateAuthenticationClientOptions clientOptions = new NegotiateAuthenticationClientOptions { Package = "NTLM", Credential = s_testCredentialRight, TargetName = "HTTP/foo" };
9095
NegotiateAuthentication negotiateAuthentication = new NegotiateAuthentication(clientOptions);
9196
NegotiateAuthenticationStatusCode statusCode;

0 commit comments

Comments
 (0)