Home / Function/ whenBuildImageIsInvokedWithBindCaches() — spring-boot Function Reference

whenBuildImageIsInvokedWithBindCaches() — spring-boot Function Reference

Architecture documentation for the whenBuildImageIsInvokedWithBindCaches() function in BuildImageTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  4f38d777_b336_b5cd_6160_2057920a5f7e["whenBuildImageIsInvokedWithBindCaches()"]
  f9fe97f0_7168_45d0_cb88_b8287c032544["randomString()"]
  4f38d777_b336_b5cd_6160_2057920a5f7e -->|calls| f9fe97f0_7168_45d0_cb88_b8287c032544
  1c432d58_16ca_1503_d046_4cba5114e02b["removeImage()"]
  4f38d777_b336_b5cd_6160_2057920a5f7e -->|calls| 1c432d58_16ca_1503_d046_4cba5114e02b
  b04a7565_b03a_2c44_e855_eade55765247["cleanupCache()"]
  4f38d777_b336_b5cd_6160_2057920a5f7e -->|calls| b04a7565_b03a_2c44_e855_eade55765247
  style 4f38d777_b336_b5cd_6160_2057920a5f7e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

build-plugin/spring-boot-maven-plugin/src/dockerTest/java/org/springframework/boot/maven/BuildImageTests.java lines 443–465

	@TestTemplate
	@EnabledOnOs(value = OS.LINUX, disabledReason = "Works with Docker Engine on Linux but is not reliable with "
			+ "Docker Desktop on other OSs")
	void whenBuildImageIsInvokedWithBindCaches(MavenBuild mavenBuild) {
		String testBuildId = randomString();
		mavenBuild.project("dockerTest", "build-image-bind-caches")
			.goals("package")
			.systemProperty("spring-boot.build-image.pullPolicy", "IF_NOT_PRESENT")
			.systemProperty("test-build-id", testBuildId)
			.execute((project) -> {
				assertThat(buildLog(project)).contains("Building image")
					.contains("docker.io/library/build-image-bind-caches:0.0.1.BUILD-SNAPSHOT")
					.contains("Successfully built image");
				removeImage("build-image-bind-caches", "0.0.1.BUILD-SNAPSHOT");
				String tempDir = System.getProperty("java.io.tmpdir");
				Path buildCachePath = Paths.get(tempDir, "junit-image-cache-" + testBuildId + "-build");
				Path launchCachePath = Paths.get(tempDir, "junit-image-cache-" + testBuildId + "-launch");
				assertThat(buildCachePath).exists().isDirectory();
				assertThat(launchCachePath).exists().isDirectory();
				cleanupCache(buildCachePath);
				cleanupCache(launchCachePath);
			});
	}

Subdomains

Calls

Frequently Asked Questions

What does whenBuildImageIsInvokedWithBindCaches() do?
whenBuildImageIsInvokedWithBindCaches() is a function in the spring-boot codebase.
What does whenBuildImageIsInvokedWithBindCaches() call?
whenBuildImageIsInvokedWithBindCaches() calls 3 function(s): cleanupCache, randomString, removeImage.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free