Browse Source

Adapt assertion to different error message

pull/49591/head
Stéphane Nicoll 2 days ago
parent
commit
ab7d6a9d29
  1. 5
      spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/dockerTest/java/org/springframework/boot/gradle/tasks/bundling/BootBuildImageIntegrationTests.java

5
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/dockerTest/java/org/springframework/boot/gradle/tasks/bundling/BootBuildImageIntegrationTests.java

@ -517,8 +517,9 @@ class BootBuildImageIntegrationTests {
void failsWithIncompatiblePlatform() throws IOException { void failsWithIncompatiblePlatform() throws IOException {
writeMainClass(); writeMainClass();
BuildResult result = this.gradleBuild.buildAndFail("bootBuildImage"); BuildResult result = this.gradleBuild.buildAndFail("bootBuildImage");
assertThat(result.getOutput()).contains( assertThat(result.getOutput()).containsAnyOf(
"Image platform mismatch detected. The configured platform 'linux/arm64' is not supported by the image 'ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.3-amd64'. Requested platform 'linux/arm64' but got 'linux/amd64'"); "Image platform mismatch detected. The configured platform 'linux/arm64' is not supported by the image 'ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.3-amd64'. Requested platform 'linux/arm64' but got 'linux/amd64'",
"image with reference ghcr.io/spring-io/spring-boot-cnb-test-builder:0.0.3-amd64 was found but its platform (linux/amd64) does not match the specified platform (linux/arm64)");
} }
private void writeMainClass() throws IOException { private void writeMainClass() throws IOException {

Loading…
Cancel
Save