use of org.springframework.boot.buildpack.platform.docker.type.ContainerConfig.Update in project spring-boot by spring-projects.
the class PhaseTests method applyWhenWithDaemonAccessUpdatesConfigurationWithRootUserAndDomainSocketBinding.
@Test
void applyWhenWithDaemonAccessUpdatesConfigurationWithRootUserAndDomainSocketBinding() {
Phase phase = new Phase("test", false);
phase.withDaemonAccess();
Update update = mock(Update.class);
phase.apply(update);
then(update).should().withUser("root");
then(update).should().withBinding(Binding.from("/var/run/docker.sock", "/var/run/docker.sock"));
then(update).should().withCommand("/cnb/lifecycle/test", NO_ARGS);
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 applyWhenWithArgsUpdatesConfigurationWithArguments.
@Test
void applyWhenWithArgsUpdatesConfigurationWithArguments() {
Phase phase = new Phase("test", false);
phase.withArgs("a", "b", "c");
Update update = mock(Update.class);
phase.apply(update);
then(update).should().withCommand("/cnb/lifecycle/test", "a", "b", "c");
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 applyUpdatesConfiguration.
@Test
void applyUpdatesConfiguration() {
Phase phase = new Phase("test", false);
Update update = mock(Update.class);
phase.apply(update);
then(update).should().withCommand("/cnb/lifecycle/test", NO_ARGS);
then(update).should().withLabel("author", "spring-boot");
then(update).shouldHaveNoMoreInteractions();
}
Aggregations