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

exportLayersWithSymlinksExportsLayerTars() — spring-boot Function Reference

Architecture documentation for the exportLayersWithSymlinksExportsLayerTars() function in DockerApiTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  a706e3af_6b12_297d_299b_4f8374d85d20["exportLayersWithSymlinksExportsLayerTars()"]
  88e4c755_21cd_03d2_7b78_c0a678363843["responseOf()"]
  a706e3af_6b12_297d_299b_4f8374d85d20 -->|calls| 88e4c755_21cd_03d2_7b78_c0a678363843
  b3171812_ab1f_87c4_a83a_2a91e929e461["getName()"]
  a706e3af_6b12_297d_299b_4f8374d85d20 -->|calls| b3171812_ab1f_87c4_a83a_2a91e929e461
  c11580dd_aefa_2785_5004_3738b7d99bd8["writeTo()"]
  a706e3af_6b12_297d_299b_4f8374d85d20 -->|calls| c11580dd_aefa_2785_5004_3738b7d99bd8
  style a706e3af_6b12_297d_299b_4f8374d85d20 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buildpack/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/DockerApiTests.java lines 563–589

		@Test
		void exportLayersWithSymlinksExportsLayerTars() throws Exception {
			ImageReference reference = ImageReference.of("docker.io/paketobuildpacks/builder:base");
			URI exportUri = new URI(IMAGES_URL + "/docker.io/paketobuildpacks/builder:base/get");
			given(DockerApiTests.this.http.get(exportUri)).willReturn(responseOf("export-symlinks.tar"));
			MultiValueMap<String, String> contents = new LinkedMultiValueMap<>();
			this.api.exportLayers(reference, (name, archive) -> {
				ByteArrayOutputStream out = new ByteArrayOutputStream();
				archive.writeTo(out);
				try (TarArchiveInputStream in = new TarArchiveInputStream(
						new ByteArrayInputStream(out.toByteArray()))) {
					TarArchiveEntry entry = in.getNextEntry();
					while (entry != null) {
						contents.add(name, entry.getName());
						entry = in.getNextEntry();
					}
				}
			});
			assertThat(contents).hasSize(3)
				.containsKeys("6aa3691a73805f608e5fce69fb6bc89aec8362f58a6b4be2682515e9cfa3cc1a.tar",
						"762e198f655bc2580ef3e56b538810fd2b9981bd707f8a44c70344b58f9aee68.tar",
						"d3cc975ad97fdfbb73d9daf157e7f658d6117249fd9c237e3856ad173c87e1d2.tar");
			assertThat(contents.get("d3cc975ad97fdfbb73d9daf157e7f658d6117249fd9c237e3856ad173c87e1d2.tar"))
				.containsExactly("/cnb/order.toml");
			assertThat(contents.get("762e198f655bc2580ef3e56b538810fd2b9981bd707f8a44c70344b58f9aee68.tar"))
				.containsExactly("/cnb/stack.toml");
		}

Subdomains

Frequently Asked Questions

What does exportLayersWithSymlinksExportsLayerTars() do?
exportLayersWithSymlinksExportsLayerTars() is a function in the spring-boot codebase.
What does exportLayersWithSymlinksExportsLayerTars() call?
exportLayersWithSymlinksExportsLayerTars() calls 3 function(s): getName, responseOf, writeTo.

Analyze Your Own Codebase

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

Try Supermodel Free