|
|
@ -81,7 +81,8 @@ class PaketoBuilderTests {
|
|
|
|
ImageReference imageReference = ImageReference.of(ImageName.of(imageName));
|
|
|
|
ImageReference imageReference = ImageReference.of(ImageName.of(imageName));
|
|
|
|
BuildResult result = buildImage(imageName);
|
|
|
|
BuildResult result = buildImage(imageName);
|
|
|
|
assertThat(result.task(":bootBuildImage").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
|
|
|
|
assertThat(result.task(":bootBuildImage").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
|
|
|
|
try (GenericContainer<?> container = new GenericContainer<>(imageName).withExposedPorts(8080)) {
|
|
|
|
try (GenericContainer<?> container = new GenericContainer<>(imageName)) {
|
|
|
|
|
|
|
|
container.withExposedPorts(8080);
|
|
|
|
container.waitingFor(Wait.forHttp("/test")).start();
|
|
|
|
container.waitingFor(Wait.forHttp("/test")).start();
|
|
|
|
ContainerConfig config = container.getContainerInfo().getConfig();
|
|
|
|
ContainerConfig config = container.getContainerInfo().getConfig();
|
|
|
|
assertLabelsMatchManifestAttributes(config);
|
|
|
|
assertLabelsMatchManifestAttributes(config);
|
|
|
@ -109,8 +110,9 @@ class PaketoBuilderTests {
|
|
|
|
ImageReference imageReference = ImageReference.of(ImageName.of(imageName));
|
|
|
|
ImageReference imageReference = ImageReference.of(ImageName.of(imageName));
|
|
|
|
BuildResult result = buildImage(imageName);
|
|
|
|
BuildResult result = buildImage(imageName);
|
|
|
|
assertThat(result.task(":bootBuildImage").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
|
|
|
|
assertThat(result.task(":bootBuildImage").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
|
|
|
|
try (GenericContainer<?> container = new GenericContainer<>(imageName).withCommand("--server.port=9090")
|
|
|
|
try (GenericContainer<?> container = new GenericContainer<>(imageName)) {
|
|
|
|
.withExposedPorts(9090)) {
|
|
|
|
container.withCommand("--server.port=9090");
|
|
|
|
|
|
|
|
container.withExposedPorts(9090);
|
|
|
|
container.waitingFor(Wait.forHttp("/test")).start();
|
|
|
|
container.waitingFor(Wait.forHttp("/test")).start();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
finally {
|
|
|
|
finally {
|
|
|
@ -125,14 +127,16 @@ class PaketoBuilderTests {
|
|
|
|
ImageReference imageReference = ImageReference.of(ImageName.of(imageName));
|
|
|
|
ImageReference imageReference = ImageReference.of(ImageName.of(imageName));
|
|
|
|
BuildResult result = buildImage(imageName);
|
|
|
|
BuildResult result = buildImage(imageName);
|
|
|
|
assertThat(result.task(":bootBuildImage").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
|
|
|
|
assertThat(result.task(":bootBuildImage").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
|
|
|
|
try (GenericContainer<?> container = new GenericContainer<>(imageName).withExposedPorts(8080)) {
|
|
|
|
try (GenericContainer<?> container = new GenericContainer<>(imageName)) {
|
|
|
|
|
|
|
|
container.withExposedPorts(8080);
|
|
|
|
container.waitingFor(Wait.forHttp("/test")).start();
|
|
|
|
container.waitingFor(Wait.forHttp("/test")).start();
|
|
|
|
container.stop();
|
|
|
|
container.stop();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.gradleBuild.expectDeprecationMessages("BOM table is deprecated");
|
|
|
|
this.gradleBuild.expectDeprecationMessages("BOM table is deprecated");
|
|
|
|
result = buildImage(imageName);
|
|
|
|
result = buildImage(imageName);
|
|
|
|
assertThat(result.task(":bootBuildImage").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
|
|
|
|
assertThat(result.task(":bootBuildImage").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
|
|
|
|
try (GenericContainer<?> container = new GenericContainer<>(imageName).withExposedPorts(8080)) {
|
|
|
|
try (GenericContainer<?> container = new GenericContainer<>(imageName)) {
|
|
|
|
|
|
|
|
container.withExposedPorts(8080);
|
|
|
|
container.waitingFor(Wait.forHttp("/test")).start();
|
|
|
|
container.waitingFor(Wait.forHttp("/test")).start();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
finally {
|
|
|
|
finally {
|
|
|
@ -148,7 +152,8 @@ class PaketoBuilderTests {
|
|
|
|
ImageReference imageReference = ImageReference.of(ImageName.of(imageName));
|
|
|
|
ImageReference imageReference = ImageReference.of(ImageName.of(imageName));
|
|
|
|
BuildResult result = buildImage(imageName, "assemble", "bootDistZip");
|
|
|
|
BuildResult result = buildImage(imageName, "assemble", "bootDistZip");
|
|
|
|
assertThat(result.task(":bootBuildImage").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
|
|
|
|
assertThat(result.task(":bootBuildImage").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
|
|
|
|
try (GenericContainer<?> container = new GenericContainer<>(imageName).withExposedPorts(8080)) {
|
|
|
|
try (GenericContainer<?> container = new GenericContainer<>(imageName)) {
|
|
|
|
|
|
|
|
container.withExposedPorts(8080);
|
|
|
|
container.waitingFor(Wait.forHttp("/test")).start();
|
|
|
|
container.waitingFor(Wait.forHttp("/test")).start();
|
|
|
|
ContainerConfig config = container.getContainerInfo().getConfig();
|
|
|
|
ContainerConfig config = container.getContainerInfo().getConfig();
|
|
|
|
ImageAssertions.assertThat(config).buildMetadata((metadata) -> {
|
|
|
|
ImageAssertions.assertThat(config).buildMetadata((metadata) -> {
|
|
|
@ -181,7 +186,8 @@ class PaketoBuilderTests {
|
|
|
|
ImageReference imageReference = ImageReference.of(ImageName.of(imageName));
|
|
|
|
ImageReference imageReference = ImageReference.of(ImageName.of(imageName));
|
|
|
|
BuildResult result = buildImage(imageName, "assemble", "bootDistZip");
|
|
|
|
BuildResult result = buildImage(imageName, "assemble", "bootDistZip");
|
|
|
|
assertThat(result.task(":bootBuildImage").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
|
|
|
|
assertThat(result.task(":bootBuildImage").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
|
|
|
|
try (GenericContainer<?> container = new GenericContainer<>(imageName).withExposedPorts(8080)) {
|
|
|
|
try (GenericContainer<?> container = new GenericContainer<>(imageName)) {
|
|
|
|
|
|
|
|
container.withExposedPorts(8080);
|
|
|
|
container.waitingFor(Wait.forHttp("/test")).start();
|
|
|
|
container.waitingFor(Wait.forHttp("/test")).start();
|
|
|
|
ContainerConfig config = container.getContainerInfo().getConfig();
|
|
|
|
ContainerConfig config = container.getContainerInfo().getConfig();
|
|
|
|
ImageAssertions.assertThat(config).buildMetadata((metadata) -> {
|
|
|
|
ImageAssertions.assertThat(config).buildMetadata((metadata) -> {
|
|
|
@ -216,7 +222,8 @@ class PaketoBuilderTests {
|
|
|
|
ImageReference imageReference = ImageReference.of(ImageName.of(imageName));
|
|
|
|
ImageReference imageReference = ImageReference.of(ImageName.of(imageName));
|
|
|
|
BuildResult result = buildImage(imageName);
|
|
|
|
BuildResult result = buildImage(imageName);
|
|
|
|
assertThat(result.task(":bootBuildImage").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
|
|
|
|
assertThat(result.task(":bootBuildImage").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
|
|
|
|
try (GenericContainer<?> container = new GenericContainer<>(imageName).withExposedPorts(8080)) {
|
|
|
|
try (GenericContainer<?> container = new GenericContainer<>(imageName)) {
|
|
|
|
|
|
|
|
container.withExposedPorts(8080);
|
|
|
|
container.waitingFor(Wait.forHttp("/test")).start();
|
|
|
|
container.waitingFor(Wait.forHttp("/test")).start();
|
|
|
|
ContainerConfig config = container.getContainerInfo().getConfig();
|
|
|
|
ContainerConfig config = container.getContainerInfo().getConfig();
|
|
|
|
assertLabelsMatchManifestAttributes(config);
|
|
|
|
assertLabelsMatchManifestAttributes(config);
|
|
|
@ -245,7 +252,8 @@ class PaketoBuilderTests {
|
|
|
|
ImageReference imageReference = ImageReference.of(ImageName.of(imageName));
|
|
|
|
ImageReference imageReference = ImageReference.of(ImageName.of(imageName));
|
|
|
|
BuildResult result = buildImage(imageName);
|
|
|
|
BuildResult result = buildImage(imageName);
|
|
|
|
assertThat(result.task(":bootBuildImage").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
|
|
|
|
assertThat(result.task(":bootBuildImage").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
|
|
|
|
try (GenericContainer<?> container = new GenericContainer<>(imageName).withExposedPorts(8080)) {
|
|
|
|
try (GenericContainer<?> container = new GenericContainer<>(imageName)) {
|
|
|
|
|
|
|
|
container.withExposedPorts(8080);
|
|
|
|
container.waitingFor(Wait.forHttp("/test")).start();
|
|
|
|
container.waitingFor(Wait.forHttp("/test")).start();
|
|
|
|
ContainerConfig config = container.getContainerInfo().getConfig();
|
|
|
|
ContainerConfig config = container.getContainerInfo().getConfig();
|
|
|
|
ImageAssertions.assertThat(config).buildMetadata((metadata) -> {
|
|
|
|
ImageAssertions.assertThat(config).buildMetadata((metadata) -> {
|
|
|
|