use of org.craftercms.studio.api.v1.service.deployment.DeploymentException in project studio by craftercms.
the class PublishingManagerImpl method markItemsBlocked.
@RetryingOperation
@Override
@ValidateParams
public void markItemsBlocked(@ValidateStringParam(name = "site") String site, @ValidateStringParam(name = "environment") String environment, List<PublishRequest> copyToEnvironmentItems) throws DeploymentException {
for (PublishRequest item : copyToEnvironmentItems) {
item.setState(PublishRequest.State.BLOCKED);
publishRequestMapper.updateItemDeploymentState(item);
}
}
use of org.craftercms.studio.api.v1.service.deployment.DeploymentException in project studio by craftercms.
the class BlobAwareContentRepositoryTest method publishMixFilesTest.
@Test
public void publishMixFilesTest() throws DeploymentException {
DeploymentItemTO remoteItem = new DeploymentItemTO();
remoteItem.setSite(SITE);
remoteItem.setPath(ORIGINAL_PATH);
DeploymentItemTO localItem = new DeploymentItemTO();
localItem.setSite(SITE);
localItem.setPath(LOCAL_PATH);
DeploymentItemTO pointerItem = new DeploymentItemTO();
pointerItem.setSite(SITE);
pointerItem.setPath(POINTER_PATH);
List<DeploymentItemTO> items = Arrays.asList(remoteItem, localItem);
proxy.publish(SITE, EMPTY, items, ENV, USER, COMMENT);
verify(store).publish(eq(SITE), eq(EMPTY), itemsCaptor.capture(), eq(ENV), eq(USER), eq(COMMENT));
assertTrue(itemsCaptor.getValue().contains(remoteItem), "remote file should have been published");
verify(localV2).publish(eq(SITE), eq(EMPTY), itemsCaptor.capture(), eq(ENV), eq(USER), eq(COMMENT));
assertTrue(itemsCaptor.getValue().contains(pointerItem), "pointer file should have been published");
verify(localV2).publish(eq(SITE), eq(EMPTY), itemsCaptor.capture(), eq(ENV), eq(USER), eq(COMMENT));
assertTrue(itemsCaptor.getValue().contains(localItem), "local file should have been published");
}
Aggregations