mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-24 15:49:26 +00:00
Introduce factory methods in SslInfo and remove MockSslInfo
After further consideration, we have decided to remove the recently introduced MockSslInfo in favor of introducing the following static factory methods directly in the SslInfo interface. - SslInfo.from(String sessionId) - SslInfo from(String sessionId, X509Certificate... peerCertificates) See gh-35042 See gh-35078
This commit is contained in:
+2
-2
@@ -24,7 +24,7 @@ import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.http.server.reactive.ServerHttpRequest;
|
||||
import org.springframework.mock.http.server.reactive.MockSslInfo;
|
||||
import org.springframework.http.server.reactive.SslInfo;
|
||||
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
|
||||
import org.springframework.test.web.reactive.server.WebTestClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -65,7 +65,7 @@ class ApplicationContextTests {
|
||||
@Test // gh-35042
|
||||
void buildWithSslInfo() {
|
||||
var client = WebTestClient.bindToApplicationContext(context)
|
||||
.sslInfo(new MockSslInfo("test123"))
|
||||
.sslInfo(SslInfo.from("test123"))
|
||||
.webFilter(new SslSessionIdFilter())
|
||||
.build();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user