Merge branch '2.3.x'

Closes gh-22917
This commit is contained in:
Andy Wilkinson
2020-08-12 17:06:30 +01:00
6 changed files with 51 additions and 15 deletions

View File

@@ -28,6 +28,7 @@ import java.util.jar.JarOutputStream;
import java.util.jar.Manifest;
import java.util.zip.ZipEntry;
import org.gradle.testkit.runner.BuildResult;
import org.junit.jupiter.api.TestTemplate;
import org.junit.jupiter.api.extension.ExtendWith;
@@ -219,6 +220,21 @@ class PackagingDocumentationTests {
}
}
@TestTemplate
void bootBuildImageWithCustomBuildpackJvmVersion() throws IOException {
BuildResult result = this.gradleBuild.script("src/docs/gradle/packaging/boot-build-image-env")
.build("bootBuildImageEnvironment");
assertThat(result.getOutput()).contains("BP_JVM_VERSION=13.0.1");
}
@TestTemplate
void bootBuildImageWithCustomProxySettings() throws IOException {
BuildResult result = this.gradleBuild.script("src/docs/gradle/packaging/boot-build-image-env-proxy")
.build("bootBuildImageEnvironment");
assertThat(result.getOutput()).contains("HTTP_PROXY=http://proxy.example.com")
.contains("HTTPS_PROXY=https://proxy.example.com");
}
protected void jarFile(File file) throws IOException {
try (JarOutputStream jar = new JarOutputStream(new FileOutputStream(file))) {
jar.putNextEntry(new ZipEntry("META-INF/MANIFEST.MF"));