|
|
|
|
@@ -61,7 +61,7 @@ class BootBuildImageIntegrationTests {
|
|
|
|
|
String projectName = this.gradleBuild.getProjectDir().getName();
|
|
|
|
|
assertThat(result.task(":bootBuildImage").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
|
|
|
|
|
assertThat(result.getOutput()).contains("docker.io/library/" + projectName);
|
|
|
|
|
assertThat(result.getOutput()).contains("cloudfoundry/cnb:bionic-platform-api");
|
|
|
|
|
assertThat(result.getOutput()).contains("paketo-buildpacks/builder");
|
|
|
|
|
ImageReference imageReference = ImageReference.of(ImageName.of(projectName));
|
|
|
|
|
try (GenericContainer<?> container = new GenericContainer<>(imageReference.toString())) {
|
|
|
|
|
container.waitingFor(Wait.forLogMessage("Launched\\n", 1)).start();
|
|
|
|
|
@@ -77,9 +77,9 @@ class BootBuildImageIntegrationTests {
|
|
|
|
|
writeLongNameResource();
|
|
|
|
|
BuildResult result = this.gradleBuild.build("bootBuildImage");
|
|
|
|
|
assertThat(result.task(":bootBuildImage").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
|
|
|
|
|
assertThat(result.getOutput()).contains("example.com/test-image-name");
|
|
|
|
|
assertThat(result.getOutput()).contains("cloudfoundry/cnb:bionic-platform-api");
|
|
|
|
|
ImageReference imageReference = ImageReference.of(ImageName.of("example.com/test-image-name"));
|
|
|
|
|
assertThat(result.getOutput()).contains("example/test-image-name");
|
|
|
|
|
assertThat(result.getOutput()).contains("paketo-buildpacks/builder");
|
|
|
|
|
ImageReference imageReference = ImageReference.of(ImageName.of("example/test-image-name"));
|
|
|
|
|
try (GenericContainer<?> container = new GenericContainer<>(imageReference.toString())) {
|
|
|
|
|
container.waitingFor(Wait.forLogMessage("Launched\\n", 1)).start();
|
|
|
|
|
}
|
|
|
|
|
@@ -93,11 +93,10 @@ class BootBuildImageIntegrationTests {
|
|
|
|
|
writeMainClass();
|
|
|
|
|
writeLongNameResource();
|
|
|
|
|
BuildResult result = this.gradleBuild.build("bootBuildImage");
|
|
|
|
|
String projectName = this.gradleBuild.getProjectDir().getName();
|
|
|
|
|
assertThat(result.task(":bootBuildImage").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
|
|
|
|
|
assertThat(result.getOutput()).contains("docker.io/library/" + projectName);
|
|
|
|
|
assertThat(result.getOutput()).contains("cloudfoundry/cnb:bionic-platform-api-0.2");
|
|
|
|
|
ImageReference imageReference = ImageReference.of(ImageName.of(projectName));
|
|
|
|
|
assertThat(result.getOutput()).contains("example/test-image-v2");
|
|
|
|
|
assertThat(result.getOutput()).contains("paketo-buildpacks/builder:base-platform-api-0.2");
|
|
|
|
|
ImageReference imageReference = ImageReference.of(ImageName.of("example/test-image-v2"));
|
|
|
|
|
try (GenericContainer<?> container = new GenericContainer<>(imageReference.toString())) {
|
|
|
|
|
container.waitingFor(Wait.forLogMessage("Launched\\n", 1)).start();
|
|
|
|
|
}
|
|
|
|
|
@@ -110,12 +109,12 @@ class BootBuildImageIntegrationTests {
|
|
|
|
|
void buildsImageWithCommandLineOptions() throws IOException {
|
|
|
|
|
writeMainClass();
|
|
|
|
|
writeLongNameResource();
|
|
|
|
|
BuildResult result = this.gradleBuild.build("bootBuildImage", "--imageName=example.com/test-image-name",
|
|
|
|
|
"--builder=cloudfoundry/cnb:bionic-platform-api-0.2");
|
|
|
|
|
BuildResult result = this.gradleBuild.build("bootBuildImage", "--imageName=example/test-image-v2",
|
|
|
|
|
"--builder=gcr.io/paketo-buildpacks/builder:base-platform-api-0.2");
|
|
|
|
|
assertThat(result.task(":bootBuildImage").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
|
|
|
|
|
assertThat(result.getOutput()).contains("example.com/test-image-name");
|
|
|
|
|
assertThat(result.getOutput()).contains("cloudfoundry/cnb:bionic-platform-api-0.2");
|
|
|
|
|
ImageReference imageReference = ImageReference.of(ImageName.of("example.com/test-image-name"));
|
|
|
|
|
assertThat(result.getOutput()).contains("example/test-image-v2");
|
|
|
|
|
assertThat(result.getOutput()).contains("paketo-buildpacks/builder:base-platform-api-0.2");
|
|
|
|
|
ImageReference imageReference = ImageReference.of(ImageName.of("example/test-image-v2"));
|
|
|
|
|
try (GenericContainer<?> container = new GenericContainer<>(imageReference.toString())) {
|
|
|
|
|
container.waitingFor(Wait.forLogMessage("Launched\\n", 1)).start();
|
|
|
|
|
}
|
|
|
|
|
|