This commit is contained in:
parent
9e2a480925
commit
8ff1cb906d
|
|
@ -129,12 +129,13 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
|
|||
}
|
||||
|
||||
[ConditionalTheory]
|
||||
[MemberData(nameof(AddressRegistrationDataIPv6Port5000Default))]
|
||||
[MemberData(nameof(AddressRegistrationDataIPv6Port5000And5001Default))]
|
||||
[IPv6SupportedCondition]
|
||||
[Flaky("https://github.com/aspnet/AspNetCore-Internal/issues/2711", FlakyOn.AzP.All)]
|
||||
public async Task RegisterAddresses_IPv6Port5000Default_Success(string addressInput, string[] testUrls)
|
||||
public async Task RegisterAddresses_IPv6Port5000And5001Default_Success(string addressInput, string[] testUrls)
|
||||
{
|
||||
if (!CanBindToEndpoint(IPAddress.Loopback, 5000) || !CanBindToEndpoint(IPAddress.IPv6Loopback, 5000))
|
||||
if ((!CanBindToEndpoint(IPAddress.Loopback, 5000) || !CanBindToEndpoint(IPAddress.IPv6Loopback, 5000)) &&
|
||||
(!CanBindToEndpoint(IPAddress.Loopback, 5001) || !CanBindToEndpoint(IPAddress.IPv6Loopback, 5001)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -183,7 +184,13 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
|
|||
private async Task RegisterAddresses_Success(string addressInput, string[] testUrls, int testPort = 0)
|
||||
{
|
||||
var hostBuilder = TransportSelector.GetWebHostBuilder()
|
||||
.UseKestrel()
|
||||
.UseKestrel(serverOptions =>
|
||||
{
|
||||
serverOptions.ConfigureHttpsDefaults(httpsOptions =>
|
||||
{
|
||||
httpsOptions.ServerCertificate = TestResources.GetTestCertificate();
|
||||
});
|
||||
})
|
||||
.ConfigureServices(AddTestLogging)
|
||||
.UseUrls(addressInput)
|
||||
.Configure(ConfigureEchoAddress);
|
||||
|
|
@ -1039,11 +1046,11 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
|
|||
}
|
||||
}
|
||||
|
||||
public static TheoryData<string, string[]> AddressRegistrationDataIPv6Port5000Default =>
|
||||
public static TheoryData<string, string[]> AddressRegistrationDataIPv6Port5000And5001Default =>
|
||||
new TheoryData<string, string[]>
|
||||
{
|
||||
{ null, new[] { "http://127.0.0.1:5000/", "http://[::1]:5000/" } },
|
||||
{ string.Empty, new[] { "http://127.0.0.1:5000/", "http://[::1]:5000/" } }
|
||||
{ null, new[] { "http://127.0.0.1:5000/", "http://[::1]:5000/", "https://127.0.0.1:5001/", "https://[::1]:5001/" } },
|
||||
{ string.Empty, new[] { "http://127.0.0.1:5000/", "http://[::1]:5000/", "https://127.0.0.1:5001/", "https://[::1]:5001/" } }
|
||||
};
|
||||
|
||||
public static TheoryData<string, string[]> AddressRegistrationDataIPv6Port80 =>
|
||||
|
|
|
|||
Loading…
Reference in New Issue