use of org.springframework.boot.buildpack.platform.docker.type.ContainerConfig.Update in project spring-boot by spring-projects.
the class PhaseTests method applyWhenWithEnvUpdatesConfigurationWithEnv.
@Test
void applyWhenWithEnvUpdatesConfigurationWithEnv() {
Phase phase = new Phase("test", false);
phase.withEnv("name1", "value1");
phase.withEnv("name2", "value2");
Update update = mock(Update.class);
phase.apply(update);
then(update).should().withCommand("/cnb/lifecycle/test");
then(update).should().withLabel("author", "spring-boot");
then(update).should().withEnv("name1", "value1");
then(update).should().withEnv("name2", "value2");
then(update).shouldHaveNoMoreInteractions();
}
use of org.springframework.boot.buildpack.platform.docker.type.ContainerConfig.Update in project spring-boot by spring-projects.
the class PhaseTests method applyWhenWithBindsUpdatesConfigurationWithBinds.
@Test
void applyWhenWithBindsUpdatesConfigurationWithBinds() {
Phase phase = new Phase("test", false);
VolumeName volumeName = VolumeName.of("test");
phase.withBinding(Binding.from(volumeName, "/test"));
Update update = mock(Update.class);
phase.apply(update);
then(update).should().withCommand("/cnb/lifecycle/test");
then(update).should().withLabel("author", "spring-boot");
then(update).should().withBinding(Binding.from(volumeName, "/test"));
then(update).shouldHaveNoMoreInteractions();
}
use of org.springframework.boot.buildpack.platform.docker.type.ContainerConfig.Update in project spring-boot by spring-projects.
the class PhaseTests method applyWhenWithNetworkModeUpdatesConfigurationWithNetworkMode.
@Test
void applyWhenWithNetworkModeUpdatesConfigurationWithNetworkMode() {
Phase phase = new Phase("test", true);
phase.withNetworkMode("test");
Update update = mock(Update.class);
phase.apply(update);
then(update).should().withCommand("/cnb/lifecycle/test");
then(update).should().withNetworkMode("test");
then(update).should().withLabel("author", "spring-boot");
then(update).shouldHaveNoMoreInteractions();
}
use of org.springframework.boot.buildpack.platform.docker.type.ContainerConfig.Update in project spring-boot by spring-projects.
the class PhaseTests method applyWhenWithLogLevelArgAndNonVerboseLoggingDoesNotUpdateLogLevel.
@Test
void applyWhenWithLogLevelArgAndNonVerboseLoggingDoesNotUpdateLogLevel() {
Phase phase = new Phase("test", false);
phase.withLogLevelArg();
Update update = mock(Update.class);
phase.apply(update);
then(update).should().withCommand("/cnb/lifecycle/test");
then(update).should().withLabel("author", "spring-boot");
then(update).shouldHaveNoMoreInteractions();
}
use of org.springframework.boot.buildpack.platform.docker.type.ContainerConfig.Update in project spring-boot by spring-projects.
the class PhaseTests method applyWhenWithLogLevelArgAndVerboseLoggingUpdatesConfigurationWithLogLevel.
@Test
void applyWhenWithLogLevelArgAndVerboseLoggingUpdatesConfigurationWithLogLevel() {
Phase phase = new Phase("test", true);
phase.withLogLevelArg();
Update update = mock(Update.class);
phase.apply(update);
then(update).should().withCommand("/cnb/lifecycle/test", "-log-level", "debug");
then(update).should().withLabel("author", "spring-boot");
then(update).shouldHaveNoMoreInteractions();
}
Aggregations