@@ -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
[ Flaky ( "https://github.com/aspnet/AspNetCore-Internal/issues/2711" , FlakyOn . AzP . All ) ]
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 ) ;
@@ -1039,11 +1046,11 @@ public static TheoryData<string, string[]> AddressRegistrationDataIPv6
1039
1046
}
1040
1047
}
1041
1048
1042
- public static TheoryData < string , string [ ] > AddressRegistrationDataIPv6Port5000Default =>
1049
+ public static TheoryData < string , string [ ] > AddressRegistrationDataIPv6Port5000And5001Default =>
1043
1050
new TheoryData < string , string [ ] >
1044
1051
{
1045
- { null , new [ ] { "http://127.0.0.1:5000/" , "http://[::1]:5000/" } } ,
1046
- { string . Empty , new [ ] { "http://127.0.0.1:5000/" , "http://[::1]:5000/" } }
1052
+ { null , new [ ] { "http://127.0.0.1:5000/" , "http://[::1]:5000/" , "https://127.0.0.1:5001/" , "https://[::1]:5001/" } } ,
1053
+ { string . Empty , new [ ] { "http://127.0.0.1:5000/" , "http://[::1]:5000/" , "https://127.0.0.1:5001/" , "https://[::1]:5001/" } }
1047
1054
} ;
1048
1055
1049
1056
public static TheoryData < string , string [ ] > AddressRegistrationDataIPv6Port80 =>
0 commit comments