Skip to content

Commit 804d79d

Browse files
committed
Merge branch '6.4.x'
2 parents fe6ddd0 + a4126aa commit 804d79d

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

oauth2/oauth2-client/src/test/java/org/springframework/security/oauth2/client/registration/ClientRegistrationsTests.java

+3-9
Original file line numberDiff line numberDiff line change
@@ -597,17 +597,11 @@ public MockResponse dispatch(RecordedRequest request) {
597597
return new MockResponse().setResponseCode(responseCode);
598598
}
599599
});
600-
String message = """
601-
Unable to resolve Configuration with the provided Issuer of "%s", errors: [\
602-
405 Client Error on GET request for "%s": [no body], \
603-
400 Client Error on GET request for "%s": [no body], \
604-
404 Client Error on GET request for "%s": [no body]]\
605-
""".formatted(this.issuer, this.server.url("/issuer1/.well-known/openid-configuration"),
606-
this.server.url("/.well-known/openid-configuration/issuer1"),
607-
this.server.url("/.well-known/oauth-authorization-server/issuer1"));
608600
assertThatExceptionOfType(IllegalArgumentException.class)
609601
.isThrownBy(() -> ClientRegistrations.fromIssuerLocation(this.issuer).build())
610-
.withMessage(message);
602+
.withMessageContaining("405")
603+
.withMessageContaining("400")
604+
.withMessageContaining("404");
611605
}
612606

613607
private ClientRegistration.Builder registration(String path) throws Exception {

0 commit comments

Comments
 (0)