From 963542e7fc36ab5ac642ed40f158b108feb71d2a Mon Sep 17 00:00:00 2001 From: Scott Frederick Date: Mon, 24 Apr 2023 16:18:56 -0500 Subject: [PATCH] Adapt Paketo system tests to changes in the Tomcat buildpack Closes gh-35148 --- .../boot/image/paketo/PaketoBuilderTests.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/spring-boot-system-tests/spring-boot-image-tests/src/systemTest/java/org/springframework/boot/image/paketo/PaketoBuilderTests.java b/spring-boot-system-tests/spring-boot-image-tests/src/systemTest/java/org/springframework/boot/image/paketo/PaketoBuilderTests.java index 86ce995ded..14131fce1c 100644 --- a/spring-boot-system-tests/spring-boot-image-tests/src/systemTest/java/org/springframework/boot/image/paketo/PaketoBuilderTests.java +++ b/spring-boot-system-tests/spring-boot-image-tests/src/systemTest/java/org/springframework/boot/image/paketo/PaketoBuilderTests.java @@ -21,7 +21,6 @@ import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.function.Consumer; @@ -276,10 +275,16 @@ class PaketoBuilderTests { "paketo-buildpacks/spring-boot"); metadata.processOfType("web") .extracting("command", "args") - .containsExactly("bash", Arrays.asList("catalina.sh", "run")); + .satisfiesExactly((command) -> assertThat(command).asString().endsWith("sh"), + (args) -> assertThat(args).asList() + .satisfiesExactly((arg) -> assertThat(arg).asString().endsWith("catalina.sh"), + (arg) -> assertThat(arg).asString().isEqualTo("run"))); metadata.processOfType("tomcat") .extracting("command", "args") - .containsExactly("bash", Arrays.asList("catalina.sh", "run")); + .satisfiesExactly((command) -> assertThat(command).asString().endsWith("sh"), + (args) -> assertThat(args).asList() + .satisfiesExactly((arg) -> assertThat(arg).asString().endsWith("catalina.sh"), + (arg) -> assertThat(arg).asString().isEqualTo("run"))); }); assertImageHasSbomLayer(imageReference, config, "apache-tomcat"); DigestCapturingCondition digest = new DigestCapturingCondition();