Search in sources :

Example 1 with VolumeCacheInfo

use of org.springframework.boot.maven.CacheInfo.VolumeCacheInfo in project spring-boot by spring-projects.

the class ImageTests method getBuildRequestWhenHasBuildVolumeCacheUsesCache.

@Test
void getBuildRequestWhenHasBuildVolumeCacheUsesCache() {
    Image image = new Image();
    image.buildCache = new CacheInfo(new VolumeCacheInfo("build-cache-vol"));
    BuildRequest request = image.getBuildRequest(createArtifact(), mockApplicationContent());
    assertThat(request.getBuildCache()).isEqualTo(Cache.volume("build-cache-vol"));
}
Also used : VolumeCacheInfo(org.springframework.boot.maven.CacheInfo.VolumeCacheInfo) BuildRequest(org.springframework.boot.buildpack.platform.build.BuildRequest) VolumeCacheInfo(org.springframework.boot.maven.CacheInfo.VolumeCacheInfo) Test(org.junit.jupiter.api.Test)

Example 2 with VolumeCacheInfo

use of org.springframework.boot.maven.CacheInfo.VolumeCacheInfo 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"));
}
Also used : VolumeCacheInfo(org.springframework.boot.maven.CacheInfo.VolumeCacheInfo) BuildRequest(org.springframework.boot.buildpack.platform.build.BuildRequest) VolumeCacheInfo(org.springframework.boot.maven.CacheInfo.VolumeCacheInfo) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)2 BuildRequest (org.springframework.boot.buildpack.platform.build.BuildRequest)2 VolumeCacheInfo (org.springframework.boot.maven.CacheInfo.VolumeCacheInfo)2