Clean up test skip conditions (#17529)

This commit is contained in:
Chris Ross 2019-12-05 04:42:39 -08:00 committed by GitHub
parent e757f2a846
commit 5033efb3fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 26 additions and 137 deletions

View File

@ -164,8 +164,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Server
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Server.HttpSys", "..\Servers\HttpSys\src\Microsoft.AspNetCore.Server.HttpSys.csproj", "{D6C3C4A9-197B-47B5-8B72-35047CBC4F22}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Server.HttpSys", "..\Servers\HttpSys\src\Microsoft.AspNetCore.Server.HttpSys.csproj", "{D6C3C4A9-197B-47B5-8B72-35047CBC4F22}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Net.Http.Headers", "..\Http\Headers\src\Microsoft.Net.Http.Headers.csproj", "{4BB8D7D7-E111-4A86-B6E5-C1201E0DA8CE}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU

View File

@ -3,7 +3,6 @@
using System; using System;
using System.IO; using System.IO;
using System.Linq;
using System.Net.Http; using System.Net.Http;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Security.Authentication; using System.Security.Authentication;
@ -20,12 +19,9 @@ using Xunit;
namespace Microsoft.AspNetCore.Server.HttpSys namespace Microsoft.AspNetCore.Server.HttpSys
{ {
// Flaky doesn't support classes :(
// https://github.com/aspnet/Extensions/issues/1568
public class HttpsTests public class HttpsTests
{ {
[ConditionalFact] [ConditionalFact]
[Flaky("https://github.com/aspnet/AspNetCore-Internal/issues/2209", FlakyOn.Helix.All)]
public async Task Https_200OK_Success() public async Task Https_200OK_Success()
{ {
using (Utilities.CreateDynamicHttpsServer(out var address, httpContext => using (Utilities.CreateDynamicHttpsServer(out var address, httpContext =>
@ -39,7 +35,6 @@ namespace Microsoft.AspNetCore.Server.HttpSys
} }
[ConditionalFact] [ConditionalFact]
[Flaky("https://github.com/aspnet/AspNetCore-Internal/issues/2209", FlakyOn.Helix.All)]
public async Task Https_SendHelloWorld_Success() public async Task Https_SendHelloWorld_Success()
{ {
using (Utilities.CreateDynamicHttpsServer(out var address, httpContext => using (Utilities.CreateDynamicHttpsServer(out var address, httpContext =>
@ -55,7 +50,6 @@ namespace Microsoft.AspNetCore.Server.HttpSys
} }
[ConditionalFact] [ConditionalFact]
[Flaky("https://github.com/aspnet/AspNetCore-Internal/issues/2209", FlakyOn.Helix.All)]
public async Task Https_EchoHelloWorld_Success() public async Task Https_EchoHelloWorld_Success()
{ {
using (Utilities.CreateDynamicHttpsServer(out var address, async httpContext => using (Utilities.CreateDynamicHttpsServer(out var address, async httpContext =>
@ -73,7 +67,6 @@ namespace Microsoft.AspNetCore.Server.HttpSys
} }
[ConditionalFact] [ConditionalFact]
[Flaky("https://github.com/aspnet/AspNetCore-Internal/issues/2209", FlakyOn.Helix.All)]
public async Task Https_ClientCertNotSent_ClientCertNotPresent() public async Task Https_ClientCertNotSent_ClientCertNotPresent()
{ {
using (Utilities.CreateDynamicHttpsServer(out var address, async httpContext => using (Utilities.CreateDynamicHttpsServer(out var address, async httpContext =>
@ -110,8 +103,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys
} }
[ConditionalFact] [ConditionalFact]
[Flaky("https://github.com/aspnet/AspNetCore-Internal/issues/2209", FlakyOn.Helix.All)] [MaximumOSVersion(OperatingSystems.Windows, WindowsVersions.Win7)]
[OSDontSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, WindowsVersions.Win2008R2)]
public async Task Https_SkipsITlsHandshakeFeatureOnWin7() public async Task Https_SkipsITlsHandshakeFeatureOnWin7()
{ {
using (Utilities.CreateDynamicHttpsServer(out var address, async httpContext => using (Utilities.CreateDynamicHttpsServer(out var address, async httpContext =>
@ -133,8 +125,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys
} }
[ConditionalFact] [ConditionalFact]
[Flaky("https://github.com/aspnet/AspNetCore-Internal/issues/2209", FlakyOn.Helix.All)] [MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win8)]
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, WindowsVersions.Win2008R2)]
public async Task Https_SetsITlsHandshakeFeature() public async Task Https_SetsITlsHandshakeFeature()
{ {
using (Utilities.CreateDynamicHttpsServer(out var address, async httpContext => using (Utilities.CreateDynamicHttpsServer(out var address, async httpContext =>
@ -164,7 +155,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys
} }
[ConditionalFact] [ConditionalFact]
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, WindowsVersions.Win2008R2)] [MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win8)]
public async Task Https_ITlsHandshakeFeature_MatchesIHttpSysExtensionInfoFeature() public async Task Https_ITlsHandshakeFeature_MatchesIHttpSysExtensionInfoFeature()
{ {
using (Utilities.CreateDynamicHttpsServer(out var address, async httpContext => using (Utilities.CreateDynamicHttpsServer(out var address, async httpContext =>

View File

@ -1,99 +0,0 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
namespace Microsoft.AspNetCore.Testing
{
// Skip except on a specific OS and version
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Assembly, AllowMultiple = true)]
public class OSDontSkipConditionAttribute : Attribute, ITestCondition
{
private readonly OperatingSystems _includedOperatingSystem;
private readonly IEnumerable<string> _includedVersions;
private readonly OperatingSystems _osPlatform;
private readonly string _osVersion;
public OSDontSkipConditionAttribute(OperatingSystems operatingSystem, params string[] versions) :
this(
operatingSystem,
GetCurrentOS(),
GetCurrentOSVersion(),
versions)
{
}
// to enable unit testing
internal OSDontSkipConditionAttribute(
OperatingSystems operatingSystem, OperatingSystems osPlatform, string osVersion, params string[] versions)
{
_includedOperatingSystem = operatingSystem;
_includedVersions = versions ?? Enumerable.Empty<string>();
_osPlatform = osPlatform;
_osVersion = osVersion;
}
public bool IsMet
{
get
{
var currentOSInfo = new OSInfo()
{
OperatingSystem = _osPlatform,
Version = _osVersion,
};
var skip = (_includedOperatingSystem & currentOSInfo.OperatingSystem) != currentOSInfo.OperatingSystem;
if (!skip && _includedVersions.Any())
{
skip = !_includedVersions.Any(inc => _osVersion.StartsWith(inc, StringComparison.OrdinalIgnoreCase));
}
// Since a test would be excuted only if 'IsMet' is true, return false if we want to skip
return !skip;
}
}
public string SkipReason { get; set; } = "Test cannot run on this operating system.";
static private OperatingSystems GetCurrentOS()
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
return OperatingSystems.Windows;
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
return OperatingSystems.Linux;
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
return OperatingSystems.MacOSX;
}
throw new PlatformNotSupportedException();
}
static private string GetCurrentOSVersion()
{
// currently not used on other OS's
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
return Environment.OSVersion.Version.ToString();
}
else
{
return string.Empty;
}
}
private class OSInfo
{
public OperatingSystems OperatingSystem { get; set; }
public string Version { get; set; }
}
}
}

View File

@ -6,7 +6,6 @@ using System.IO;
using System.Net.Http; using System.Net.Http;
using System.Net.Sockets; using System.Net.Sockets;
using System.Text; using System.Text;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Features; using Microsoft.AspNetCore.Http.Features;
@ -18,7 +17,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys
public class OpaqueUpgradeTests public class OpaqueUpgradeTests
{ {
[ConditionalFact] [ConditionalFact]
[OSDontSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, WindowsVersions.Win2008R2)] [MaximumOSVersion(OperatingSystems.Windows, WindowsVersions.Win7)]
public async Task OpaqueUpgrade_DownLevel_FeatureIsAbsent() public async Task OpaqueUpgrade_DownLevel_FeatureIsAbsent()
{ {
using (Utilities.CreateHttpServer(out var address, httpContext => using (Utilities.CreateHttpServer(out var address, httpContext =>
@ -44,7 +43,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys
} }
[ConditionalFact] [ConditionalFact]
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, WindowsVersions.Win2008R2)] [MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win8)]
public async Task OpaqueUpgrade_SupportKeys_Present() public async Task OpaqueUpgrade_SupportKeys_Present()
{ {
string address; string address;
@ -71,7 +70,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys
} }
[ConditionalFact] [ConditionalFact]
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, WindowsVersions.Win2008R2)] [MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win8)]
public async Task OpaqueUpgrade_AfterHeadersSent_Throws() public async Task OpaqueUpgrade_AfterHeadersSent_Throws()
{ {
bool? upgradeThrew = null; bool? upgradeThrew = null;
@ -101,7 +100,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys
} }
[ConditionalFact] [ConditionalFact]
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, WindowsVersions.Win2008R2)] [MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win8)]
public async Task OpaqueUpgrade_GetUpgrade_Success() public async Task OpaqueUpgrade_GetUpgrade_Success()
{ {
var upgraded = new TaskCompletionSource<bool>(TaskCreationOptions.RunContinuationsAsynchronously); var upgraded = new TaskCompletionSource<bool>(TaskCreationOptions.RunContinuationsAsynchronously);
@ -123,7 +122,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys
} }
[ConditionalFact] [ConditionalFact]
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, WindowsVersions.Win2008R2)] [MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win8)]
public async Task OpaqueUpgrade_GetUpgrade_NotAffectedByMaxRequestBodyLimit() public async Task OpaqueUpgrade_GetUpgrade_NotAffectedByMaxRequestBodyLimit()
{ {
var upgraded = new TaskCompletionSource<bool>(TaskCreationOptions.RunContinuationsAsynchronously); var upgraded = new TaskCompletionSource<bool>(TaskCreationOptions.RunContinuationsAsynchronously);
@ -155,7 +154,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys
} }
[ConditionalFact] [ConditionalFact]
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, WindowsVersions.Win2008R2)] [MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win8)]
public async Task OpaqueUpgrade_WithOnStarting_CallbackCalled() public async Task OpaqueUpgrade_WithOnStarting_CallbackCalled()
{ {
var callbackCalled = false; var callbackCalled = false;
@ -184,7 +183,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys
} }
[ConditionalTheory] [ConditionalTheory]
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, WindowsVersions.Win2008R2)] [MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win8)]
// See HTTP_VERB for known verbs // See HTTP_VERB for known verbs
[InlineData("UNKNOWN", null)] [InlineData("UNKNOWN", null)]
[InlineData("INVALID", null)] [InlineData("INVALID", null)]
@ -242,7 +241,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys
} }
[ConditionalTheory] [ConditionalTheory]
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, WindowsVersions.Win2008R2)] [MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win8)]
// Http.Sys returns a 411 Length Required if PUT or POST does not specify content-length or chunked. // Http.Sys returns a 411 Length Required if PUT or POST does not specify content-length or chunked.
[InlineData("POST", "Content-Length: 10")] [InlineData("POST", "Content-Length: 10")]
[InlineData("POST", "Transfer-Encoding: chunked")] [InlineData("POST", "Transfer-Encoding: chunked")]

View File

@ -66,7 +66,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys.FunctionalTests
} }
[ConditionalFact] [ConditionalFact]
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win2008R2, WindowsVersions.Win7, SkipReason = "Content type not required for caching on Win7 and Win2008R2.")] [MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win8, SkipReason = "Content type not required for caching on Win7.")]
public async Task Caching_WithoutContentType_NotCached() public async Task Caching_WithoutContentType_NotCached()
{ {
var requestCount = 1; var requestCount = 1;

View File

@ -35,7 +35,7 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
[ConditionalTheory] [ConditionalTheory]
[MemberData(nameof(TestVariants))] [MemberData(nameof(TestVariants))]
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, WindowsVersions.Win2008R2)] [MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win8)]
public Task HttpsNoClientCert_NoClientCert(TestVariant variant) public Task HttpsNoClientCert_NoClientCert(TestVariant variant)
{ {
return ClientCertTest(variant, sendClientCert: false); return ClientCertTest(variant, sendClientCert: false);
@ -43,7 +43,7 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
[ConditionalTheory] [ConditionalTheory]
[MemberData(nameof(TestVariants))] [MemberData(nameof(TestVariants))]
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, WindowsVersions.Win2008R2)] [MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win8)]
public Task HttpsClientCert_GetCertInformation(TestVariant variant) public Task HttpsClientCert_GetCertInformation(TestVariant variant)
{ {
return ClientCertTest(variant, sendClientCert: true); return ClientCertTest(variant, sendClientCert: true);

View File

@ -32,7 +32,7 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
[ConditionalTheory] [ConditionalTheory]
[MemberData(nameof(TestVariants))] [MemberData(nameof(TestVariants))]
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, WindowsVersions.Win2008R2)] [MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win8)]
public async Task HttpsHelloWorld(TestVariant variant) public async Task HttpsHelloWorld(TestVariant variant)
{ {
var port = TestPortHelper.GetNextSSLPort(); var port = TestPortHelper.GetNextSSLPort();
@ -94,7 +94,7 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
[ConditionalFact] [ConditionalFact]
[RequiresNewHandler] [RequiresNewHandler]
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, WindowsVersions.Win81)] [MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win10)]
public async Task CheckProtocolIsHttp2() public async Task CheckProtocolIsHttp2()
{ {
var port = TestPortHelper.GetNextSSLPort(); var port = TestPortHelper.GetNextSSLPort();

View File

@ -14,7 +14,7 @@ using Xunit;
namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
{ {
[SkipIfHostableWebCoreNotAvailable] [SkipIfHostableWebCoreNotAvailable]
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, "https://github.com/aspnet/IISIntegration/issues/866")] [MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win8, SkipReason = "https://github.com/aspnet/IISIntegration/issues/866")]
public class ClientDisconnectTests : StrictTestServerTests public class ClientDisconnectTests : StrictTestServerTests
{ {
[ConditionalFact] [ConditionalFact]

View File

@ -9,7 +9,7 @@ using Xunit;
namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
{ {
[SkipIfHostableWebCoreNotAvailable] [SkipIfHostableWebCoreNotAvailable]
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, "https://github.com/aspnet/IISIntegration/issues/866")] [MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win8, SkipReason = "https://github.com/aspnet/IISIntegration/issues/866")]
public class ConnectionIdFeatureTests : StrictTestServerTests public class ConnectionIdFeatureTests : StrictTestServerTests
{ {
[ConditionalFact] [ConditionalFact]

View File

@ -10,7 +10,7 @@ using Xunit;
namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
{ {
[SkipIfHostableWebCoreNotAvailable] [SkipIfHostableWebCoreNotAvailable]
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, "https://github.com/aspnet/IISIntegration/issues/866")] [MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win8, SkipReason = "https://github.com/aspnet/IISIntegration/issues/866")]
public class HttpBodyControlFeatureTests : StrictTestServerTests public class HttpBodyControlFeatureTests : StrictTestServerTests
{ {
[ConditionalFact] [ConditionalFact]

View File

@ -15,7 +15,7 @@ using Xunit;
namespace IIS.Tests namespace IIS.Tests
{ {
[SkipIfHostableWebCoreNotAvailable] [SkipIfHostableWebCoreNotAvailable]
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, "https://github.com/aspnet/IISIntegration/issues/866")] [MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win8, SkipReason = "https://github.com/aspnet/IISIntegration/issues/866")]
public class MaxRequestBodySizeTests : LoggedTest public class MaxRequestBodySizeTests : LoggedTest
{ {
[ConditionalFact] [ConditionalFact]

View File

@ -12,7 +12,7 @@ using Xunit;
namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
{ {
[SkipIfHostableWebCoreNotAvailable] [SkipIfHostableWebCoreNotAvailable]
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, "https://github.com/aspnet/IISIntegration/issues/866")] [MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win8, SkipReason = "https://github.com/aspnet/IISIntegration/issues/866")]
public class ResponseAbortTests : StrictTestServerTests public class ResponseAbortTests : StrictTestServerTests
{ {
[ConditionalFact] [ConditionalFact]

View File

@ -10,7 +10,7 @@ using Xunit;
namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
{ {
[SkipIfHostableWebCoreNotAvailable] [SkipIfHostableWebCoreNotAvailable]
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, "https://github.com/aspnet/IISIntegration/issues/866")] [MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win8, SkipReason = "https://github.com/aspnet/IISIntegration/issues/866")]
public class TestServerTest : StrictTestServerTests public class TestServerTest : StrictTestServerTests
{ {
[ConditionalFact] [ConditionalFact]

View File

@ -13,7 +13,7 @@ using Xunit;
namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
{ {
[Collection(IISTestSiteCollection.Name)] [Collection(IISTestSiteCollection.Name)]
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No supported on this platform")] [MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win8, SkipReason = "No WebSocket supported on Win7")]
public class WebSocketsTests public class WebSocketsTests
{ {
private readonly string _webSocketUri; private readonly string _webSocketUri;

View File

@ -320,7 +320,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Tests
// [InlineData("http2", HttpProtocols.Http2)] // Not supported due to missing ALPN support. https://github.com/dotnet/corefx/issues/33016 // [InlineData("http2", HttpProtocols.Http2)] // Not supported due to missing ALPN support. https://github.com/dotnet/corefx/issues/33016
[InlineData("http1AndHttp2", HttpProtocols.Http1AndHttp2)] // Gracefully falls back to HTTP/1 [InlineData("http1AndHttp2", HttpProtocols.Http1AndHttp2)] // Gracefully falls back to HTTP/1
[OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.Linux)]
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win10, WindowsVersions.Win81)] [MaximumOSVersion(OperatingSystems.Windows, WindowsVersions.Win7)]
public void DefaultConfigSectionCanSetProtocols_MacAndWin7(string input, HttpProtocols expected) public void DefaultConfigSectionCanSetProtocols_MacAndWin7(string input, HttpProtocols expected)
=> DefaultConfigSectionCanSetProtocols(input, expected); => DefaultConfigSectionCanSetProtocols(input, expected);
@ -389,7 +389,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Tests
// [InlineData("http2", HttpProtocols.Http2)] // Not supported due to missing ALPN support. https://github.com/dotnet/corefx/issues/33016 // [InlineData("http2", HttpProtocols.Http2)] // Not supported due to missing ALPN support. https://github.com/dotnet/corefx/issues/33016
[InlineData("http1AndHttp2", HttpProtocols.Http1AndHttp2)] // Gracefully falls back to HTTP/1 [InlineData("http1AndHttp2", HttpProtocols.Http1AndHttp2)] // Gracefully falls back to HTTP/1
[OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.Linux)]
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win10, WindowsVersions.Win81)] [MaximumOSVersion(OperatingSystems.Windows, WindowsVersions.Win7)]
public void EndpointConfigSectionCanSetProtocols_MacAndWin7(string input, HttpProtocols expected) => public void EndpointConfigSectionCanSetProtocols_MacAndWin7(string input, HttpProtocols expected) =>
EndpointConfigSectionCanSetProtocols(input, expected); EndpointConfigSectionCanSetProtocols(input, expected);

View File

@ -58,7 +58,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests.Http2
[ConditionalFact] [ConditionalFact]
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win10, WindowsVersions.Win81)] [MaximumOSVersion(OperatingSystems.Windows, WindowsVersions.Win7)]
// Win7 SslStream is missing ALPN support. // Win7 SslStream is missing ALPN support.
public void TlsAndHttp2NotSupportedOnWin7() public void TlsAndHttp2NotSupportedOnWin7()
{ {