diff --git a/test/Microsoft.AspNetCore.Server.Kestrel.FunctionalTests/AddressRegistrationTests.cs b/test/Microsoft.AspNetCore.Server.Kestrel.FunctionalTests/AddressRegistrationTests.cs index 1849113b0a..dcdbaa67a3 100644 --- a/test/Microsoft.AspNetCore.Server.Kestrel.FunctionalTests/AddressRegistrationTests.cs +++ b/test/Microsoft.AspNetCore.Server.Kestrel.FunctionalTests/AddressRegistrationTests.cs @@ -34,6 +34,13 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests await RegisterAddresses_Success(addressInput, testUrls); } + [ConditionalTheory, MemberData(nameof(AddressRegistrationDataIPv4Port5000Default))] + [PortSupportedCondition(5000)] + public async Task RegisterAddresses_IPv4Port5000Default_Success(string addressInput, Func testUrls) + { + await RegisterAddresses_Success(addressInput, testUrls); + } + [ConditionalTheory, MemberData(nameof(AddressRegistrationDataIPv4Port80))] [PortSupportedCondition(80)] public async Task RegisterAddresses_IPv4Port80_Success(string addressInput, Func testUrls) @@ -63,6 +70,14 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests await RegisterAddresses_Success(addressInput, testUrls); } + [ConditionalTheory, MemberData(nameof(AddressRegistrationDataIPv6Port5000Default))] + [IPv6SupportedCondition] + [PortSupportedCondition(5000)] + public async Task RegisterAddresses_IPv6Port5000Default_Success(string addressInput, Func testUrls) + { + await RegisterAddresses_Success(addressInput, testUrls); + } + [ConditionalTheory, MemberData(nameof(AddressRegistrationDataIPv6Port80))] [IPv6SupportedCondition] [PortSupportedCondition(80)] @@ -273,10 +288,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests { var dataset = new TheoryData>(); - // Default host and port - dataset.Add(null, _ => new[] { "http://127.0.0.1:5000/" }); - dataset.Add(string.Empty, _ => new[] { "http://127.0.0.1:5000/" }); - // Static ports var port = GetNextPort(); @@ -305,6 +316,13 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests } } + public static TheoryData> AddressRegistrationDataIPv4Port5000Default => + new TheoryData> + { + { null, _ => new[] { "http://127.0.0.1:5000/" } }, + { string.Empty, _ => new[] { "http://127.0.0.1:5000/" } } + }; + public static TheoryData> IPEndPointRegistrationDataRandomPort { get @@ -384,10 +402,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests { var dataset = new TheoryData>(); - // Default host and port - dataset.Add(null, _ => new[] { "http://127.0.0.1:5000/", "http://[::1]:5000/" }); - dataset.Add(string.Empty, _ => new[] { "http://127.0.0.1:5000/", "http://[::1]:5000/" }); - // Static ports var port = GetNextPort(); @@ -422,6 +436,13 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests } } + public static TheoryData> AddressRegistrationDataIPv6Port5000Default => + new TheoryData> + { + { null, _ => new[] { "http://127.0.0.1:5000/", "http://[::1]:5000/" } }, + { string.Empty, _ => new[] { "http://127.0.0.1:5000/", "http://[::1]:5000/" } } + }; + public static TheoryData> AddressRegistrationDataIPv6Port80 { get