@@ -129,12 +129,13 @@ public async Task RegisterAddresses_IPv6_Success(string addressInput, string[] t
129
129
}
130
130
131
131
[ ConditionalTheory ]
132
- [ MemberData ( nameof ( AddressRegistrationDataIPv6Port5000Default ) ) ]
132
+ [ MemberData ( nameof ( AddressRegistrationDataIPv6Port5000And5001Default ) ) ]
133
133
[ IPv6SupportedCondition ]
134
134
[ QuarantinedTest ( "https://github.com/dotnet/aspnetcore-internal/issues/2711" ) ]
135
- public async Task RegisterAddresses_IPv6Port5000Default_Success ( string addressInput , string [ ] testUrls )
135
+ public async Task RegisterAddresses_IPv6Port5000And5001Default_Success ( string addressInput , string [ ] testUrls )
136
136
{
137
- if ( ! CanBindToEndpoint ( IPAddress . Loopback , 5000 ) || ! CanBindToEndpoint ( IPAddress . IPv6Loopback , 5000 ) )
137
+ if ( ( ! CanBindToEndpoint ( IPAddress . Loopback , 5000 ) || ! CanBindToEndpoint ( IPAddress . IPv6Loopback , 5000 ) ) &&
138
+ ( ! CanBindToEndpoint ( IPAddress . Loopback , 5001 ) || ! CanBindToEndpoint ( IPAddress . IPv6Loopback , 5001 ) ) )
138
139
{
139
140
return ;
140
141
}
@@ -183,7 +184,13 @@ public async Task RegisterAddresses_IPv6LocalhostStaticPort_Success()
183
184
private async Task RegisterAddresses_Success ( string addressInput , string [ ] testUrls , int testPort = 0 )
184
185
{
185
186
var hostBuilder = TransportSelector . GetWebHostBuilder ( )
186
- . UseKestrel ( )
187
+ . UseKestrel ( serverOptions =>
188
+ {
189
+ serverOptions . ConfigureHttpsDefaults ( httpsOptions =>
190
+ {
191
+ httpsOptions . ServerCertificate = TestResources . GetTestCertificate ( ) ;
192
+ } ) ;
193
+ } )
187
194
. ConfigureServices ( AddTestLogging )
188
195
. UseUrls ( addressInput )
189
196
. Configure ( ConfigureEchoAddress ) ;
@@ -1038,11 +1045,11 @@ public static TheoryData<string, string[]> AddressRegistrationDataIPv6
1038
1045
}
1039
1046
}
1040
1047
1041
- public static TheoryData < string , string [ ] > AddressRegistrationDataIPv6Port5000Default =>
1048
+ public static TheoryData < string , string [ ] > AddressRegistrationDataIPv6Port5000And5001Default =>
1042
1049
new TheoryData < string , string [ ] >
1043
1050
{
1044
- { null , new [ ] { "http://127.0.0.1:5000/" , "http://[::1]:5000/" } } ,
1045
- { string . Empty , new [ ] { "http://127.0.0.1:5000/" , "http://[::1]:5000/" } }
1051
+ { null , new [ ] { "http://127.0.0.1:5000/" , "http://[::1]:5000/" , "https://127.0.0.1:5001/" , "https://[::1]:5001/" } } ,
1052
+ { string . Empty , new [ ] { "http://127.0.0.1:5000/" , "http://[::1]:5000/" , "https://127.0.0.1:5001/" , "https://[::1]:5001/" } }
1046
1053
} ;
1047
1054
1048
1055
public static TheoryData < string , string [ ] > AddressRegistrationDataIPv6Port80 =>
0 commit comments