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

whenBuildImageIsInvokedWithCurrentCreatedDate() — spring-boot Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  13c989e5_00c5_720d_ff58_3cfe1eb19804["whenBuildImageIsInvokedWithCurrentCreatedDate()"]
  41f5c9ca_7a61_90cb_4750_c29c1a092e1c["DockerApi()"]
  13c989e5_00c5_720d_ff58_3cfe1eb19804 -->|calls| 41f5c9ca_7a61_90cb_4750_c29c1a092e1c
  8b3fcc9b_3941_2812_09e4_c0a09539f3dd["inspect()"]
  13c989e5_00c5_720d_ff58_3cfe1eb19804 -->|calls| 8b3fcc9b_3941_2812_09e4_c0a09539f3dd
  a18a2648_7c7c_16c8_52c2_6d1bb55a7462["getCreated()"]
  13c989e5_00c5_720d_ff58_3cfe1eb19804 -->|calls| a18a2648_7c7c_16c8_52c2_6d1bb55a7462
  1c432d58_16ca_1503_d046_4cba5114e02b["removeImage()"]
  13c989e5_00c5_720d_ff58_3cfe1eb19804 -->|calls| 1c432d58_16ca_1503_d046_4cba5114e02b
  6973e1db_a9cb_9d4d_d9b0_e1dd043abfb1["image()"]
  13c989e5_00c5_720d_ff58_3cfe1eb19804 -->|calls| 6973e1db_a9cb_9d4d_d9b0_e1dd043abfb1
  56c6a94a_906f_bea5_18c0_207cf050ae68["of()"]
  13c989e5_00c5_720d_ff58_3cfe1eb19804 -->|calls| 56c6a94a_906f_bea5_18c0_207cf050ae68
  style 13c989e5_00c5_720d_ff58_3cfe1eb19804 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 492–511

	@TestTemplate
	void whenBuildImageIsInvokedWithCurrentCreatedDate(MavenBuild mavenBuild) {
		mavenBuild.project("dockerTest", "build-image-current-created-date")
			.goals("package")
			.systemProperty("spring-boot.build-image.pullPolicy", "IF_NOT_PRESENT")
			.execute((project) -> {
				assertThat(buildLog(project)).contains("Building image")
					.contains("docker.io/library/build-image-current-created-date:0.0.1.BUILD-SNAPSHOT")
					.contains("Successfully built image");
				Image image = new DockerApi().image()
					.inspect(ImageReference
						.of("docker.io/library/build-image-current-created-date:0.0.1.BUILD-SNAPSHOT"));
				OffsetDateTime createdDateTime = OffsetDateTime.parse(image.getCreated());
				OffsetDateTime current = OffsetDateTime.now().withOffsetSameInstant(createdDateTime.getOffset());
				assertThat(createdDateTime.getYear()).isEqualTo(current.getYear());
				assertThat(createdDateTime.getMonth()).isEqualTo(current.getMonth());
				assertThat(createdDateTime.getDayOfMonth()).isEqualTo(current.getDayOfMonth());
				removeImage("build-image-current-created-date", "0.0.1.BUILD-SNAPSHOT");
			});
	}

Subdomains

Frequently Asked Questions

What does whenBuildImageIsInvokedWithCurrentCreatedDate() do?
whenBuildImageIsInvokedWithCurrentCreatedDate() is a function in the spring-boot codebase.
What does whenBuildImageIsInvokedWithCurrentCreatedDate() call?
whenBuildImageIsInvokedWithCurrentCreatedDate() calls 6 function(s): DockerApi, getCreated, image, inspect, of, removeImage.

Analyze Your Own Codebase

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

Try Supermodel Free