Add nullability annotations to tests in smoke-test/spring-boot-smoke-test-web-groovy-templates

See gh-47263
This commit is contained in:
Moritz Halbritter
2025-10-16 11:24:49 +02:00
parent 34b1a89c82
commit c9417eb277
2 changed files with 5 additions and 0 deletions
@@ -29,3 +29,7 @@ dependencies {
testImplementation(project(":starter:spring-boot-starter-test"))
testImplementation(project(":starter:spring-boot-starter-webmvc-test"))
}
tasks.named("compileTestJava") {
options.nullability.checking = "tests"
}
@@ -62,6 +62,7 @@ class SampleGroovyTemplateApplicationTests {
map.set("text", "FOO text");
map.set("summary", "FOO");
URI location = this.restTemplate.postForLocation("/", map);
assertThat(location).isNotNull();
assertThat(location.toString()).contains("localhost:" + this.port);
}