use of org.mule.runtime.module.deployment.impl.internal.builder.DomainBundleFileBuilder in project mule by mulesoft.
the class DomainBundleDeploymentTestCase method redeploysDomainBundleCausesUndeployOfRemovedApps.
@Test
public void redeploysDomainBundleCausesUndeployOfRemovedApps() throws Exception {
ApplicationFileBuilder applicationFileBuilder1 = new ApplicationFileBuilder(dummyAppDescriptorFileBuilder).dependingOn(dummyDomainFileBuilder);
ApplicationFileBuilder applicationFileBuilder2 = new ApplicationFileBuilder(emptyAppFileBuilder).dependingOn(dummyDomainFileBuilder);
DomainBundleFileBuilder domainBundleFileBuilder = new DomainBundleFileBuilder(dummyDomainFileBuilder).containing(applicationFileBuilder1).containing(applicationFileBuilder2);
addDomainBundleFromBuilder(domainBundleFileBuilder);
startDeployment();
assertDeploymentSuccess(domainBundleDeploymentListener, domainBundleFileBuilder.getId());
assertDeploymentSuccess(domainDeploymentListener, dummyDomainFileBuilder.getId());
assertApplicationDeploymentSuccess(applicationDeploymentListener, applicationFileBuilder1.getId());
assertApplicationDeploymentSuccess(applicationDeploymentListener, applicationFileBuilder2.getId());
reset(domainDeploymentListener);
reset(domainBundleDeploymentListener);
reset(applicationDeploymentListener);
domainBundleFileBuilder = new DomainBundleFileBuilder(dummyDomainFileBuilder).containing(applicationFileBuilder1);
addDomainBundleFromBuilder(domainBundleFileBuilder);
assertDeploymentSuccess(domainBundleDeploymentListener, domainBundleFileBuilder.getId());
assertDomainRedeploymentSuccess(dummyDomainFileBuilder.getId());
assertApplicationRedeploymentSuccess(applicationFileBuilder1.getId());
assertApplicationMissingOnBundleRedeployment(applicationFileBuilder2.getId());
}
use of org.mule.runtime.module.deployment.impl.internal.builder.DomainBundleFileBuilder in project mule by mulesoft.
the class DomainBundleDeploymentTestCase method redeploysDomainBundleWithBrokenDomain.
@Test
public void redeploysDomainBundleWithBrokenDomain() throws Exception {
ApplicationFileBuilder applicationFileBuilder = new ApplicationFileBuilder(dummyAppDescriptorFileBuilder).dependingOn(dummyDomainFileBuilder);
DomainBundleFileBuilder domainBundleFileBuilder = new DomainBundleFileBuilder(dummyDomainFileBuilder).containing(applicationFileBuilder);
addDomainBundleFromBuilder(domainBundleFileBuilder);
startDeployment();
assertDeploymentSuccess(domainBundleDeploymentListener, domainBundleFileBuilder.getId());
assertDeploymentSuccess(domainDeploymentListener, dummyDomainFileBuilder.getId());
assertApplicationDeploymentSuccess(applicationDeploymentListener, dummyAppDescriptorFileBuilder.getId());
reset(domainDeploymentListener);
reset(domainBundleDeploymentListener);
reset(applicationDeploymentListener);
dummyDomainFileBuilder = new DomainFileBuilder(dummyDomainFileBuilder).corrupted();
domainBundleFileBuilder = new DomainBundleFileBuilder(dummyDomainFileBuilder).containing(applicationFileBuilder);
addDomainBundleFromBuilder(domainBundleFileBuilder);
assertDeploymentFailure(domainBundleDeploymentListener, domainBundleFileBuilder.getId());
assertDomainRedeploymentFailure(dummyDomainFileBuilder.getId());
assertRedeploymentFailure(applicationDeploymentListener, dummyAppDescriptorFileBuilder.getId());
assertThat(deploymentService.findApplication(dummyAppDescriptorFileBuilder.getId()), is(nullValue()));
}
use of org.mule.runtime.module.deployment.impl.internal.builder.DomainBundleFileBuilder in project mule by mulesoft.
the class DomainBundleDeploymentTestCase method redeploysDomainBundle.
@Test
public void redeploysDomainBundle() throws Exception {
ApplicationFileBuilder applicationFileBuilder = new ApplicationFileBuilder(dummyAppDescriptorFileBuilder).dependingOn(dummyDomainFileBuilder);
DomainBundleFileBuilder domainBundleFileBuilder = new DomainBundleFileBuilder(dummyDomainFileBuilder).containing(applicationFileBuilder);
addDomainBundleFromBuilder(domainBundleFileBuilder);
startDeployment();
assertDeploymentSuccess(domainBundleDeploymentListener, domainBundleFileBuilder.getId());
assertDeploymentSuccess(domainDeploymentListener, dummyDomainFileBuilder.getId());
assertApplicationDeploymentSuccess(applicationDeploymentListener, dummyAppDescriptorFileBuilder.getId());
reset(domainDeploymentListener);
reset(domainBundleDeploymentListener);
reset(applicationDeploymentListener);
addDomainBundleFromBuilder(domainBundleFileBuilder);
assertDeploymentSuccess(domainBundleDeploymentListener, domainBundleFileBuilder.getId());
assertDomainRedeploymentSuccess(dummyDomainFileBuilder.getId());
assertApplicationRedeploymentSuccess(dummyAppDescriptorFileBuilder.getId());
}
use of org.mule.runtime.module.deployment.impl.internal.builder.DomainBundleFileBuilder in project mule by mulesoft.
the class DomainBundleDeploymentTestCase method deploysDomainBundle.
@Test
public void deploysDomainBundle() throws Exception {
ApplicationFileBuilder applicationFileBuilder = new ApplicationFileBuilder(dummyAppDescriptorFileBuilder).dependingOn(dummyDomainFileBuilder);
DomainBundleFileBuilder domainBundleFileBuilder = new DomainBundleFileBuilder(dummyDomainFileBuilder).containing(applicationFileBuilder);
addDomainBundleFromBuilder(domainBundleFileBuilder);
startDeployment();
assertDeploymentSuccess(domainBundleDeploymentListener, domainBundleFileBuilder.getId());
assertDeploymentSuccess(domainDeploymentListener, dummyDomainFileBuilder.getId());
assertApplicationDeploymentSuccess(applicationDeploymentListener, dummyAppDescriptorFileBuilder.getId());
assertDomainDir(NONE, new String[] { DEFAULT_DOMAIN_NAME, dummyDomainFileBuilder.getId() }, true);
assertAppsDir(NONE, new String[] { dummyAppDescriptorFileBuilder.getId() }, true);
}
use of org.mule.runtime.module.deployment.impl.internal.builder.DomainBundleFileBuilder in project mule by mulesoft.
the class DomainBundleDeploymentTestCase method deploysDomainBundleWithCorruptedApp.
@Test
public void deploysDomainBundleWithCorruptedApp() throws Exception {
ApplicationFileBuilder applicationFileBuilder = new ApplicationFileBuilder(dummyAppDescriptorFileBuilder).corrupted();
DomainBundleFileBuilder domainBundleFileBuilder = new DomainBundleFileBuilder(dummyDomainFileBuilder).containing(applicationFileBuilder);
addDomainBundleFromBuilder(domainBundleFileBuilder);
startDeployment();
assertDeploymentFailure(domainBundleDeploymentListener, domainBundleFileBuilder.getId());
assertDomainDir(NONE, new String[] { DEFAULT_DOMAIN_NAME, dummyDomainFileBuilder.getId() }, true);
assertDeploymentSuccess(domainDeploymentListener, dummyDomainFileBuilder.getId());
assertDeploymentFailure(applicationDeploymentListener, dummyAppDescriptorFileBuilder.getId());
}
Aggregations