Search in sources :

Example 16 with DomainFileBuilder

use of org.mule.runtime.module.deployment.impl.internal.builder.DomainFileBuilder in project mule by mulesoft.

the class DomainDeploymentTestCase method deploysAppUsingDomainExtension.

@Test
public void deploysAppUsingDomainExtension() throws Exception {
    installEchoService();
    installFooService();
    DomainFileBuilder domainFileBuilder = new DomainFileBuilder("dummy-domain-bundle").definedBy("empty-domain-config.xml").dependingOn(helloExtensionV1Plugin);
    ApplicationFileBuilder applicationFileBuilder = new ApplicationFileBuilder("appWithHelloExtension").definedBy(APP_WITH_EXTENSION_PLUGIN_CONFIG).dependingOn(domainFileBuilder);
    addPackedDomainFromBuilder(domainFileBuilder);
    addPackedAppFromBuilder(applicationFileBuilder);
    startDeployment();
    assertDeploymentSuccess(domainDeploymentListener, domainFileBuilder.getId());
    assertDeploymentSuccess(applicationDeploymentListener, applicationFileBuilder.getId());
    executeApplicationFlow("main");
}
Also used : ApplicationFileBuilder(org.mule.runtime.module.deployment.impl.internal.builder.ApplicationFileBuilder) DomainFileBuilder(org.mule.runtime.module.deployment.impl.internal.builder.DomainFileBuilder) Test(org.junit.Test)

Example 17 with DomainFileBuilder

use of org.mule.runtime.module.deployment.impl.internal.builder.DomainFileBuilder in project mule by mulesoft.

the class DomainDeploymentTestCase method deploysAppUsingDomainPlugin.

@Test
public void deploysAppUsingDomainPlugin() throws Exception {
    DomainFileBuilder domainFileBuilder = new DomainFileBuilder("dummy-domain-bundle").definedBy("empty-domain-config.xml").dependingOn(echoPlugin);
    ApplicationFileBuilder echoPluginAppFileBuilder = new ApplicationFileBuilder("dummyWithEchoPlugin").definedBy("app-with-echo-plugin-config.xml").dependingOn(domainFileBuilder);
    addPackedDomainFromBuilder(domainFileBuilder);
    addPackedAppFromBuilder(echoPluginAppFileBuilder);
    startDeployment();
    assertDeploymentSuccess(domainDeploymentListener, domainFileBuilder.getId());
    assertDeploymentSuccess(applicationDeploymentListener, echoPluginAppFileBuilder.getId());
    executeApplicationFlow("main");
}
Also used : ApplicationFileBuilder(org.mule.runtime.module.deployment.impl.internal.builder.ApplicationFileBuilder) DomainFileBuilder(org.mule.runtime.module.deployment.impl.internal.builder.DomainFileBuilder) Test(org.junit.Test)

Aggregations

DomainFileBuilder (org.mule.runtime.module.deployment.impl.internal.builder.DomainFileBuilder)17 Test (org.junit.Test)16 ApplicationFileBuilder (org.mule.runtime.module.deployment.impl.internal.builder.ApplicationFileBuilder)14 JarFileBuilder (org.mule.runtime.module.deployment.impl.internal.builder.JarFileBuilder)7 ByteArrayInputStream (java.io.ByteArrayInputStream)5 File (java.io.File)5 FileInputStream (java.io.FileInputStream)5 FileUtils.copyFile (org.apache.commons.io.FileUtils.copyFile)5 FileUtils.copyInputStreamToFile (org.apache.commons.io.FileUtils.copyInputStreamToFile)5 Ignore (org.junit.Ignore)5 ArtifactPluginFileBuilder (org.mule.runtime.module.deployment.impl.internal.builder.ArtifactPluginFileBuilder)5 IOException (java.io.IOException)4 URI (java.net.URI)4 URISyntaxException (java.net.URISyntaxException)4 URL (java.net.URL)4 Paths (java.nio.file.Paths)4 Collection (java.util.Collection)4 Collections.emptyList (java.util.Collections.emptyList)4 Collections.emptyMap (java.util.Collections.emptyMap)4 Properties (java.util.Properties)4