|
|
|
|
@ -49,6 +49,7 @@ import static org.assertj.core.api.Assertions.entry;
@@ -49,6 +49,7 @@ import static org.assertj.core.api.Assertions.entry;
|
|
|
|
|
* @author Scott Frederick |
|
|
|
|
* @author Jeroen Meijer |
|
|
|
|
* @author Rafael Ceccone |
|
|
|
|
* @author Moritz Halbritter |
|
|
|
|
*/ |
|
|
|
|
class ImageTests { |
|
|
|
|
|
|
|
|
|
@ -290,6 +291,14 @@ class ImageTests {
@@ -290,6 +291,14 @@ class ImageTests {
|
|
|
|
|
assertThat(request.getImagePlatform()).isEqualTo(ImagePlatform.of("linux/arm64")); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
void getBuildRequestWhenImagePlatformIsEmptyDoesntSetImagePlatform() { |
|
|
|
|
Image image = new Image(); |
|
|
|
|
image.imagePlatform = ""; |
|
|
|
|
BuildRequest request = image.getBuildRequest(createArtifact(), mockApplicationContent()); |
|
|
|
|
assertThat(request.getImagePlatform()).isNull(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private Artifact createArtifact() { |
|
|
|
|
return new DefaultArtifact("com.example", "my-app", VersionRange.createFromVersion("0.0.1-SNAPSHOT"), "compile", |
|
|
|
|
"jar", null, new DefaultArtifactHandler()); |
|
|
|
|
|