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