[jboss-cvs] JBossAS SVN: r62584 - in trunk/testsuite: src/main/org/jboss/test/deployment and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Apr 26 09:03:14 EDT 2007
Author: jfrederic.clere at jboss.com
Date: 2007-04-26 09:03:14 -0400 (Thu, 26 Apr 2007)
New Revision: 62584
Added:
trunk/testsuite/src/resources/deployment/WEB-INF/badweb.xml
Modified:
trunk/testsuite/imports/sections/deployers.xml
trunk/testsuite/src/main/org/jboss/test/deployment/BaseDeploymentTestCase.java
Log:
Add a test that deploys something that can't deploy correctly.
Modified: trunk/testsuite/imports/sections/deployers.xml
===================================================================
--- trunk/testsuite/imports/sections/deployers.xml 2007-04-26 12:30:02 UTC (rev 62583)
+++ trunk/testsuite/imports/sections/deployers.xml 2007-04-26 13:03:14 UTC (rev 62584)
@@ -258,6 +258,14 @@
</classes>
</war>
+ <!-- build baddeployment-web.war -->
+ <war warfile="${build.lib}/baddeployment-web.war"
+ webxml="${build.resources}/deployment/WEB-INF/badweb.xml">
+ <classes dir="${build.classes}">
+ <include name="org/jboss/test/deployment/SampleServlet.class"/>
+ </classes>
+ </war>
+
<!-- build deployment-web-jboss.war -->
<war warfile="${build.lib}/deployment-web-jboss.war"
webxml="${build.resources}/deployment/WEB-INF/web.xml">
Modified: trunk/testsuite/src/main/org/jboss/test/deployment/BaseDeploymentTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/deployment/BaseDeploymentTestCase.java 2007-04-26 12:30:02 UTC (rev 62583)
+++ trunk/testsuite/src/main/org/jboss/test/deployment/BaseDeploymentTestCase.java 2007-04-26 13:03:14 UTC (rev 62584)
@@ -133,6 +133,29 @@
}
}
+ /** Distribute a bad web app
+ */
+ public void testBadWar() throws Exception
+ {
+ ProgressObject progress = null;
+ try
+ {
+ progress = jsr88Deployment("baddeployment-web.war");
+ }
+ catch (java.lang.Throwable e)
+ {
+ return; // Done
+ }
+ if (progress != null)
+ {
+ DeploymentStatus state = progress.getDeploymentStatus();
+ jsr88Undeploy(progress.getResultTargetModuleIDs());
+ if (state.getState() != StateType.FAILED)
+ fail("Test deployment deployement should have failed");
+ }
+ return; // Done
+ }
+
/**
* Distribute a EJB app
*/
Added: trunk/testsuite/src/resources/deployment/WEB-INF/badweb.xml
===================================================================
--- trunk/testsuite/src/resources/deployment/WEB-INF/badweb.xml (rev 0)
+++ trunk/testsuite/src/resources/deployment/WEB-INF/badweb.xml 2007-04-26 13:03:14 UTC (rev 62584)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <servlet>
+ <servlet-name>SampleServlet</servlet-name>
+ <servlet-class>org.jboss.test.deployment.SampleServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>SampleServlet</servlet-name>
+ <url-pattern>/myapp
+/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
+
More information about the jboss-cvs-commits
mailing list