use of org.springframework.boot.buildpack.platform.build.BuildRequest in project spring-boot by spring-projects.
the class ImageTests method getBuildRequestWhenNameIsNullDeducesName.
@Test
void getBuildRequestWhenNameIsNullDeducesName() {
BuildRequest request = new Image().getBuildRequest(createArtifact(), mockApplicationContent());
assertThat(request.getName().toString()).isEqualTo("docker.io/library/my-app:0.0.1-SNAPSHOT");
}
use of org.springframework.boot.buildpack.platform.build.BuildRequest in project spring-boot by spring-projects.
the class ImageTests method getBuildRequestWhenHasLaunchVolumeCacheUsesCache.
@Test
void getBuildRequestWhenHasLaunchVolumeCacheUsesCache() {
Image image = new Image();
image.launchCache = new CacheInfo(new VolumeCacheInfo("launch-cache-vol"));
BuildRequest request = image.getBuildRequest(createArtifact(), mockApplicationContent());
assertThat(request.getLaunchCache()).isEqualTo(Cache.volume("launch-cache-vol"));
}
use of org.springframework.boot.buildpack.platform.build.BuildRequest in project spring-boot by spring-projects.
the class ImageTests method getBuildRequestWhenHasEnvUsesEnv.
@Test
void getBuildRequestWhenHasEnvUsesEnv() {
Image image = new Image();
image.env = Collections.singletonMap("test", "test");
BuildRequest request = image.getBuildRequest(createArtifact(), mockApplicationContent());
assertThat(request.getEnv()).containsExactly(entry("test", "test"));
}
Aggregations