mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-17 12:09:16 +00:00
Add nullability annotations to tests in smoke-test/spring-boot-smoke-test-actuator-custom-security
See gh-47263
This commit is contained in:
@@ -30,4 +30,8 @@ dependencies {
|
||||
testImplementation(project(":starter:spring-boot-starter-test"))
|
||||
|
||||
testRuntimeOnly("org.apache.httpcomponents.client5:httpclient5")
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named("compileTestJava") {
|
||||
options.nullability.checking = "tests"
|
||||
}
|
||||
|
||||
+1
@@ -52,6 +52,7 @@ class SampleActuatorCustomSecurityApplicationTests extends AbstractSampleActuato
|
||||
ResponseEntity<Map> entity = restTemplate().getForEntity(getPath() + "/foo", Map.class);
|
||||
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR);
|
||||
Map<String, Object> body = entity.getBody();
|
||||
assertThat(body).isNotNull();
|
||||
assertThat((String) body.get("message")).contains("Expected exception in controller");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user