use of org.springframework.boot.buildpack.platform.docker.type.VolumeName 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.VolumeName in project spring-boot by spring-projects.
the class LifecycleTests method executeWhenCleanCacheClearsCache.
@Test
void executeWhenCleanCacheClearsCache() throws Exception {
given(this.docker.container().create(any())).willAnswer(answerWithGeneratedContainerId());
given(this.docker.container().create(any(), any())).willAnswer(answerWithGeneratedContainerId());
given(this.docker.container().wait(any())).willReturn(ContainerStatus.of(0, null));
BuildRequest request = getTestRequest().withCleanCache(true);
createLifecycle(request).execute();
assertPhaseWasRun("creator", withExpectedConfig("lifecycle-creator-clean-cache.json"));
VolumeName name = VolumeName.of("pack-cache-b35197ac41ea.build");
then(this.docker.volume()).should().delete(name, true);
}
Aggregations