Search in sources :

Example 6 with Update

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();
}
Also used : Update(org.springframework.boot.buildpack.platform.docker.type.ContainerConfig.Update) Test(org.junit.jupiter.api.Test)

Example 7 with Update

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();
}
Also used : Update(org.springframework.boot.buildpack.platform.docker.type.ContainerConfig.Update) Test(org.junit.jupiter.api.Test)

Example 8 with Update

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();
}
Also used : Update(org.springframework.boot.buildpack.platform.docker.type.ContainerConfig.Update) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)8 Update (org.springframework.boot.buildpack.platform.docker.type.ContainerConfig.Update)8 VolumeName (org.springframework.boot.buildpack.platform.docker.type.VolumeName)1