From d9c823d3b00ca614d497faa6a33ccc4846a2ec34 Mon Sep 17 00:00:00 2001 From: "Chris Ross (ASP.NET)" Date: Wed, 4 Apr 2018 15:36:44 -0700 Subject: [PATCH] Renable auth tests with new HttpClient #439, ServerTests/#82 --- build/dependencies.props | 18 +++++++++--------- .../AuthenticationTests.cs | 19 +++++++------------ .../Listener/AuthenticationTests.cs | 8 +++----- 3 files changed, 19 insertions(+), 26 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 3d57165b97..89f628ce25 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -4,17 +4,17 @@ 2.1.0-preview3-17002 - 2.1.0-preview3-32110 - 2.1.0-preview3-32110 - 2.1.0-preview3-32110 - 2.1.0-preview3-32110 + 2.1.0-preview3-32122 + 2.1.0-preview3-32122 + 2.1.0-preview3-32122 + 2.1.0-preview3-32122 2.0.0 - 2.1.0-preview3-26331-01 - 2.1.0-preview3-32110 + 2.1.0-preview2-26403-06 + 2.1.0-preview3-32122 15.6.1 - 4.5.0-preview3-26331-02 - 4.5.0-preview3-26331-02 - 4.5.0-preview3-26331-02 + 4.5.0-preview2-26403-05 + 4.5.0-preview2-26403-05 + 4.5.0-preview2-26403-05 2.3.1 2.4.0-beta.1.build3945 diff --git a/test/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests/AuthenticationTests.cs b/test/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests/AuthenticationTests.cs index b1fdb0ed19..06bc6f2c32 100644 --- a/test/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests/AuthenticationTests.cs +++ b/test/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests/AuthenticationTests.cs @@ -40,9 +40,9 @@ namespace Microsoft.AspNetCore.Server.HttpSys Assert.Empty(response.Headers.WwwAuthenticate); } } - +#if !NETCOREAPP2_0 + // https://github.com/aspnet/ServerTests/issues/82 [ConditionalTheory] - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR, SkipReason = "HttpClientHandler issue (https://github.com/aspnet/ServerTests/issues/82).")] [InlineData(AuthenticationSchemes.Negotiate)] [InlineData(AuthenticationSchemes.NTLM)] // [InlineData(AuthenticationSchemes.Digest)] // TODO: Not implemented @@ -61,7 +61,6 @@ namespace Microsoft.AspNetCore.Server.HttpSys } [ConditionalTheory] - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR, SkipReason = "HttpClientHandler issue (https://github.com/aspnet/ServerTests/issues/82).")] [InlineData(AuthenticationSchemes.Negotiate)] [InlineData(AuthenticationSchemes.NTLM)] // [InlineData(AuthenticationSchemes.Digest)] // TODO: Not implemented @@ -84,7 +83,6 @@ namespace Microsoft.AspNetCore.Server.HttpSys } [ConditionalFact] - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR, SkipReason = "HttpClientHandler issue (https://github.com/aspnet/ServerTests/issues/82).")] public async Task MultipleAuthTypes_AllowAnonymousButSpecify401_ChallengesAdded() { string address; @@ -109,7 +107,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys Assert.Equal("Negotiate, NTLM, basic", response.Headers.WwwAuthenticate.ToString(), StringComparer.OrdinalIgnoreCase); } } - +#endif [ConditionalTheory] [InlineData(AuthenticationSchemes.Negotiate)] [InlineData(AuthenticationSchemes.NTLM)] @@ -240,9 +238,9 @@ namespace Microsoft.AspNetCore.Server.HttpSys Assert.Equal(HttpStatusCode.OK, response.StatusCode); } } - +#if !NETCOREAPP2_0 + // https://github.com/aspnet/ServerTests/issues/82 [ConditionalTheory] - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR, SkipReason = "HttpClientHandler issue (https://github.com/aspnet/ServerTests/issues/82).")] [InlineData(AuthenticationSchemes.Negotiate)] [InlineData(AuthenticationSchemes.NTLM)] // [InlineData(AuthenticationSchemes.Digest)] @@ -266,7 +264,6 @@ namespace Microsoft.AspNetCore.Server.HttpSys } [ConditionalTheory] - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR, SkipReason = "HttpClientHandler issue (https://github.com/aspnet/ServerTests/issues/82).")] [InlineData(AuthenticationSchemes.Negotiate)] [InlineData(AuthenticationSchemes.NTLM)] // [InlineData(AuthenticationSchemes.Digest)] @@ -290,7 +287,6 @@ namespace Microsoft.AspNetCore.Server.HttpSys } [ConditionalFact] - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR, SkipReason = "HttpClientHandler issue (https://github.com/aspnet/ServerTests/issues/82).")] public async Task AuthTypes_OneChallengeSent() { var authTypes = AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM | /*AuthenticationSchemes.Digest |*/ AuthenticationSchemes.Basic; @@ -309,7 +305,6 @@ namespace Microsoft.AspNetCore.Server.HttpSys } [ConditionalTheory] - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR, SkipReason = "HttpClientHandler issue (https://github.com/aspnet/ServerTests/issues/82).")] [InlineData(AuthenticationSchemes.Negotiate)] [InlineData(AuthenticationSchemes.NTLM)] // [InlineData(AuthenticationSchemes.Digest)] @@ -334,7 +329,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys Assert.Equal(authTypeList.Count(), response.Headers.WwwAuthenticate.Count); } } - +#endif [ConditionalFact] public async Task AuthTypes_Forbid_Forbidden() { @@ -353,7 +348,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys } } - [ConditionalTheory(Skip = "https://github.com/aspnet/HttpSysServer/issues/439")] + [ConditionalTheory] [InlineData(AuthenticationSchemes.Negotiate)] [InlineData(AuthenticationSchemes.NTLM)] // [InlineData(AuthenticationSchemes.Digest)] // Not implemented diff --git a/test/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests/Listener/AuthenticationTests.cs b/test/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests/Listener/AuthenticationTests.cs index ac7cb7056e..db32323bdf 100644 --- a/test/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests/Listener/AuthenticationTests.cs +++ b/test/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests/Listener/AuthenticationTests.cs @@ -40,9 +40,9 @@ namespace Microsoft.AspNetCore.Server.HttpSys.Listener Assert.Empty(response.Headers.WwwAuthenticate); } } - +#if !NETCOREAPP2_0 + // https://github.com/aspnet/ServerTests/issues/82 [ConditionalTheory] - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR, SkipReason = "HttpClientHandler issue (https://github.com/aspnet/ServerTests/issues/82).")] [InlineData(AuthenticationSchemes.Negotiate)] [InlineData(AuthenticationSchemes.NTLM)] // [InlineData(AuthenticationType.Digest)] // TODO: Not implemented @@ -62,7 +62,6 @@ namespace Microsoft.AspNetCore.Server.HttpSys.Listener } [ConditionalTheory] - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR, SkipReason = "HttpClientHandler issue (https://github.com/aspnet/ServerTests/issues/82).")] [InlineData(AuthenticationSchemes.Negotiate)] [InlineData(AuthenticationSchemes.NTLM)] // [InlineData(AuthenticationSchemes.Digest)] // TODO: Not implemented @@ -88,7 +87,6 @@ namespace Microsoft.AspNetCore.Server.HttpSys.Listener } [ConditionalFact] - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR, SkipReason = "HttpClientHandler issue (https://github.com/aspnet/ServerTests/issues/82).")] public async Task MultipleAuthTypes_AllowAnonymousButSpecify401_ChallengesAdded() { string address; @@ -113,7 +111,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys.Listener Assert.Equal("Negotiate, NTLM, basic", response.Headers.WwwAuthenticate.ToString(), StringComparer.OrdinalIgnoreCase); } } - +#endif [ConditionalTheory] [InlineData(AuthenticationSchemes.Negotiate)] [InlineData(AuthenticationSchemes.NTLM)]