use of org.springframework.boot.buildpack.platform.build.BuildRequest in project spring-boot by spring-projects.
the class ImageTests method getBuildRequestWhenHasBindingsUsesBindings.
@Test
void getBuildRequestWhenHasBindingsUsesBindings() {
Image image = new Image();
image.bindings = Arrays.asList("host-src:container-dest:ro", "volume-name:container-dest:rw");
BuildRequest request = image.getBuildRequest(createArtifact(), mockApplicationContent());
assertThat(request.getBindings()).containsExactly(Binding.of("host-src:container-dest:ro"), Binding.of("volume-name:container-dest:rw"));
}
use of org.springframework.boot.buildpack.platform.build.BuildRequest in project spring-boot by spring-projects.
the class ImageTests method getBuildRequestWhenHasBuilderUsesBuilder.
@Test
void getBuildRequestWhenHasBuilderUsesBuilder() {
Image image = new Image();
image.builder = "springboot/builder:2.2.x";
BuildRequest request = image.getBuildRequest(createArtifact(), mockApplicationContent());
assertThat(request.getBuilder().toString()).isEqualTo("docker.io/springboot/builder:2.2.x");
}
use of org.springframework.boot.buildpack.platform.build.BuildRequest in project spring-boot by spring-projects.
the class ImageTests method getBuildRequestWhenHasVerboseLoggingUsesVerboseLogging.
@Test
void getBuildRequestWhenHasVerboseLoggingUsesVerboseLogging() {
Image image = new Image();
image.verboseLogging = true;
BuildRequest request = image.getBuildRequest(createArtifact(), mockApplicationContent());
assertThat(request.isVerboseLogging()).isTrue();
}
use of org.springframework.boot.buildpack.platform.build.BuildRequest in project spring-boot by spring-projects.
the class ImageTests method getBuildRequestWhenNetworkUsesNetwork.
@Test
void getBuildRequestWhenNetworkUsesNetwork() {
Image image = new Image();
image.network = "test";
BuildRequest request = image.getBuildRequest(createArtifact(), mockApplicationContent());
assertThat(request.getNetwork()).isEqualTo("test");
}
use of org.springframework.boot.buildpack.platform.build.BuildRequest in project spring-boot by spring-projects.
the class ImageTests method getBuildRequestWhenHasTagsUsesTags.
@Test
void getBuildRequestWhenHasTagsUsesTags() {
Image image = new Image();
image.tags = Arrays.asList("my-app:latest", "example.com/my-app:0.0.1-SNAPSHOT", "example.com/my-app:latest");
BuildRequest request = image.getBuildRequest(createArtifact(), mockApplicationContent());
assertThat(request.getTags()).containsExactly(ImageReference.of("my-app:latest"), ImageReference.of("example.com/my-app:0.0.1-SNAPSHOT"), ImageReference.of("example.com/my-app:latest"));
}
Aggregations