Skip to content

Commit 35a9a7f

Browse files
Ignore deprecation warnings in Paketo system tests
Closes gh-30194
1 parent d717614 commit 35a9a7f

File tree

2 files changed

+4
-3
lines changed
  • spring-boot-project/spring-boot-tools/spring-boot-gradle-test-support/src/main/java/org/springframework/boot/testsupport/gradle/testkit
  • spring-boot-system-tests/spring-boot-image-tests/src/systemTest/java/org/springframework/boot/image/paketo

2 files changed

+4
-3
lines changed

spring-boot-project/spring-boot-tools/spring-boot-gradle-test-support/src/main/java/org/springframework/boot/testsupport/gradle/testkit/GradleBuild.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public class GradleBuild {
8080

8181
private GradleVersion expectDeprecationWarnings;
8282

83-
private String[] expectedDeprecationMessages;
83+
private List<String> expectedDeprecationMessages = new ArrayList<>();
8484

8585
private boolean configurationCache = false;
8686

@@ -155,7 +155,7 @@ public GradleBuild expectDeprecationWarningsWithAtLeastVersion(String gradleVers
155155
}
156156

157157
public GradleBuild expectDeprecationMessages(String... messages) {
158-
this.expectedDeprecationMessages = messages;
158+
this.expectedDeprecationMessages.addAll(Arrays.asList(messages));
159159
return this;
160160
}
161161

spring-boot-system-tests/spring-boot-image-tests/src/systemTest/java/org/springframework/boot/image/paketo/PaketoBuilderTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ class PaketoBuilderTests {
6767
void configureGradleBuild() {
6868
this.gradleBuild.scriptProperty("systemTestMavenRepository",
6969
new File("build/system-test-maven-repository").getAbsoluteFile().toURI().toASCIIString());
70+
this.gradleBuild.expectDeprecationMessages("BPL_SPRING_CLOUD_BINDINGS_ENABLED.*true.*Deprecated");
7071
}
7172

7273
@Test
@@ -122,7 +123,7 @@ void executableJarAppBuiltTwiceWithCaching() throws Exception {
122123
container.waitingFor(Wait.forHttp("/test")).start();
123124
container.stop();
124125
}
125-
this.gradleBuild.expectDeprecationMessages("BOM table is deprecated in this buildpack api version");
126+
this.gradleBuild.expectDeprecationMessages("BOM table is deprecated");
126127
result = buildImage(imageName);
127128
assertThat(result.task(":bootBuildImage").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
128129
try (GenericContainer<?> container = new GenericContainer<>(imageName).withExposedPorts(8080)) {

0 commit comments

Comments
 (0)