Add nullability annotations to tests in smoke-test/spring-boot-smoke-test-actuator-custom-security

See gh-47263
This commit is contained in:
Moritz Halbritter
2025-10-16 11:24:41 +02:00
parent 15db7c5158
commit 1b27de688a
2 changed files with 6 additions and 1 deletions
@@ -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"
}
@@ -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");
}