mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Make SslInfo nullable
This allows autowiring a MockServerSpec in test class and using a different identity or none at all with each test. Polishing in MockServerSpecTests. See gh-35042
This commit is contained in:
+2
-2
@@ -71,8 +71,8 @@ abstract class AbstractMockServerSpec<B extends WebTestClient.MockServerSpec<B>>
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends B> T sslInfo(SslInfo sslInfo) {
|
||||
this.sslInfo = sslInfo;
|
||||
public <T extends B> T sslInfo(@Nullable SslInfo info) {
|
||||
this.sslInfo = info;
|
||||
return self();
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -277,13 +277,13 @@ public interface WebTestClient {
|
||||
<T extends B> T webSessionManager(WebSessionManager sessionManager);
|
||||
|
||||
/**
|
||||
* Provide SSL session information and certificates for the mock server.
|
||||
* @param sslInfo the {@link SslInfo} to use
|
||||
* Set or reset SSL session information to assign to mock server requests.
|
||||
* @param info the {@link SslInfo} to use
|
||||
* @since 7.0
|
||||
* @see SslInfo#from(String)
|
||||
* @see SslInfo#from(String, java.security.cert.X509Certificate...)
|
||||
*/
|
||||
<T extends B> T sslInfo(SslInfo sslInfo);
|
||||
<T extends B> T sslInfo(@Nullable SslInfo info);
|
||||
|
||||
/**
|
||||
* Shortcut for pre-packaged customizations to the mock server setup.
|
||||
|
||||
Reference in New Issue
Block a user