Search in sources :

Example 41 with ZipExporterImpl

use of org.jboss.shrinkwrap.impl.base.exporter.zip.ZipExporterImpl in project eap-additional-testsuite by jboss-set.

the class DeploySingleServerGroupTestCase method testRedeploy.

public void testRedeploy() throws Exception {
    // check we have original deployment
    checkURL("/SimpleServlet/page.html", "Version1", serverGroups[0]);
    // update the deployment - replace page.html
    war = ShrinkWrap.create(WebArchive.class, "SimpleServlet.war");
    war.addClass(SimpleServlet.class);
    war.addAsWebResource(new StringAsset("Version2"), "page.html");
    new ZipExporterImpl(war).exportTo(warFile, true);
    // redeploy to group servers
    assertFalse(cli.sendLine("deploy --server-groups=" + serverGroups[0] + " " + warFile.getAbsolutePath(), true));
    // force redeploy
    cli.sendLine("deploy " + warFile.getAbsolutePath() + " --force");
    // check that new version is running
    checkURL("/SimpleServlet/page.html", "Version2", serverGroups[0]);
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) ZipExporterImpl(org.jboss.shrinkwrap.impl.base.exporter.zip.ZipExporterImpl)

Aggregations

ZipExporterImpl (org.jboss.shrinkwrap.impl.base.exporter.zip.ZipExporterImpl)41 WebArchive (org.jboss.shrinkwrap.api.spec.WebArchive)38 File (java.io.File)33 StringAsset (org.jboss.shrinkwrap.api.asset.StringAsset)32 BeforeClass (org.junit.BeforeClass)22 EnterpriseArchive (org.jboss.shrinkwrap.api.spec.EnterpriseArchive)11 BasicPath (org.jboss.shrinkwrap.impl.base.path.BasicPath)8 URL (java.net.URL)4 SimpleHelloWorldServlet (org.jboss.as.test.integration.management.util.SimpleHelloWorldServlet)3 JavaArchive (org.jboss.shrinkwrap.api.spec.JavaArchive)3 SocketPermission (java.net.SocketPermission)2 CLIOpResult (org.jboss.as.test.integration.management.util.CLIOpResult)2 ExplodedExporterImpl (org.jboss.shrinkwrap.impl.base.exporter.ExplodedExporterImpl)2 ITestConfigBuilder (org.apache.camel.itest.springboot.ITestConfigBuilder)1 CoreMatchers.containsString (org.hamcrest.CoreMatchers.containsString)1 FooDriver (org.jboss.as.test.integration.domain.driver.FooDriver)1 Test (org.junit.Test)1