mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Polish
See gh-21286
This commit is contained in:
parent
e4618cfb8d
commit
8cd07dbc60
@ -141,20 +141,6 @@ class DefaultErrorWebExceptionHandlerIntegrationTests {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
void includeStackTraceOnTraceParam() {
|
|
||||||
this.contextRunner.withPropertyValues("server.error.include-exception=true",
|
|
||||||
"server.error.include-stacktrace=on-trace-param").run((context) -> {
|
|
||||||
WebTestClient client = getWebClient(context);
|
|
||||||
client.get().uri("/?trace=true").exchange().expectStatus()
|
|
||||||
.isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR).expectBody().jsonPath("status")
|
|
||||||
.isEqualTo("500").jsonPath("error")
|
|
||||||
.isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR.getReasonPhrase()).jsonPath("exception")
|
|
||||||
.isEqualTo(IllegalStateException.class.getName()).jsonPath("trace").exists()
|
|
||||||
.jsonPath("requestId").isEqualTo(this.logIdFilter.getLogId());
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void includeStackTraceOnParam() {
|
void includeStackTraceOnParam() {
|
||||||
this.contextRunner
|
this.contextRunner
|
||||||
|
Loading…
Reference in New Issue
Block a user