[jboss-cvs] JBossAS SVN: r67417 - in trunk/testsuite: imports/sections and 15 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Nov 23 12:38:05 EST 2007


Author: sguilhen at redhat.com
Date: 2007-11-23 12:38:04 -0500 (Fri, 23 Nov 2007)
New Revision: 67417

Modified:
   trunk/testsuite/build.xml
   trunk/testsuite/imports/sections/web.xml
   trunk/testsuite/src/main/org/jboss/test/web/test/WebProgrammaticLoginTestCase.java
   trunk/testsuite/src/resources/security-spi/rolemapping/web/WEB-INF/jboss-web.xml
   trunk/testsuite/src/resources/securitymgr/war1/jboss-web.xml
   trunk/testsuite/src/resources/web/custom-principal/WEB-INF/jboss-web.xml
   trunk/testsuite/src/resources/web/federation/authext/header-auth/WEB-INF/jboss-web.xml
   trunk/testsuite/src/resources/web/federation/genericheader/jboss-web.xml
   trunk/testsuite/src/resources/web/form-auth/jboss-web.xml
   trunk/testsuite/src/resources/web/html/bad/WEB-INF/jboss-web.xml
   trunk/testsuite/src/resources/web/html/other/WEB-INF/jboss-web.xml
   trunk/testsuite/src/resources/web/html/ssl/jboss-web.xml
   trunk/testsuite/src/resources/web/jaspi-form-auth/jboss-web.xml
   trunk/testsuite/src/resources/web/programmatic/WEB-INF/jboss-web.xml
   trunk/testsuite/src/resources/web/programmatic/application.xml
   trunk/testsuite/src/resources/web/simple-xmlonly/jboss-web.xml
   trunk/testsuite/src/resources/web/sso/war/jboss-web.xml
Log:
JBAS-4643: Fixed the DTD URL of the test files.



Modified: trunk/testsuite/build.xml
===================================================================
--- trunk/testsuite/build.xml	2007-11-23 16:51:55 UTC (rev 67416)
+++ trunk/testsuite/build.xml	2007-11-23 17:38:04 UTC (rev 67417)
@@ -722,9 +722,11 @@
    <!-- Tests needing non-clustered tomcat SSO -->
    <patternset id="tc-sso.includes">
       <include name="org/jboss/test/web/test/SingleSignOnUnitTestCase.class"/>
+      <include name="org/jboss/test/web/test/WebProgrammaticLoginTestCase.class"/>
    </patternset>
    <patternset id="tc-sso.excludes">
       <exclude name="org/jboss/test/web/test/SingleSignOnUnitTestCase.class"/>
+      <exclude name="org/jboss/test/web/test/WebProgrammaticLoginTestCase.class"/>
    </patternset>
    <!-- Tests needing clustered tomcat SSO -->
    <patternset id="tc-sso-clustered.includes">

Modified: trunk/testsuite/imports/sections/web.xml
===================================================================
--- trunk/testsuite/imports/sections/web.xml	2007-11-23 16:51:55 UTC (rev 67416)
+++ trunk/testsuite/imports/sections/web.xml	2007-11-23 17:38:04 UTC (rev 67417)
@@ -643,7 +643,7 @@
       <!-- JBAS-4077: Programmatic Web Login -->
       <war destfile="${build.lib}/programmaticweblogin.war"
          webxml="${build.resources}/web/programmatic/WEB-INF/jbosstest-web.xml">
-         <webinf dir="${build.resources}/web/form-auth">
+         <webinf dir="${build.resources}/web/programmatic/WEB-INF">
             <include name="jboss-web.xml"/>
          </webinf>
          <classes dir="${build.classes}">
@@ -651,24 +651,18 @@
          </classes>
       </war>
       <zip destfile="${build.lib}/programmaticweblogin.ear">
-         <zipfileset dir="${build.resources}/web/form-auth" prefix="META-INF">
-            <include name="jboss-app.xml"/>
-            <include name="security-config.xml"/>
-         </zipfileset>
          <zipfileset dir="${build.resources}/web/programmatic" prefix="META-INF">
             <include name="application.xml"/>
          </zipfileset>
-         <zipfileset dir="${build.resources}/web"
-            fullpath="form-auth-users.properties"
-            includes="users.properties"/>
-         <zipfileset dir="${build.resources}/web"
-            fullpath="form-auth-roles.properties"
-            includes="roles.properties"/>
-         <zipfileset dir="${build.lib}" includes="programmatic*.war"/>
-         <zipfileset dir="${build.resources}/web/form-auth"
-            includes="jboss-service.xml"/>
+         <zipfileset dir="${build.resources}/web">
+            <include name="users.properties"/>
+            <include name="roles.properties"/>
+         </zipfileset>
+         <zipfileset dir="${build.lib}" includes="programmaticweblogin.war"/>
+         <zipfileset dir="${build.lib}" includes="sso-form-auth.war"/>
+         <zipfileset dir="${build.lib}" includes="jbosstest-web-ejbs.jar"/>
       </zip>
-
+      	
       <!-- War java2ClassLoadingCompliance=true test  -->
       <war destfile="${build.lib}/class-loading.war"
          webxml="${build.resources}/web/class-loading/web.xml">

Modified: trunk/testsuite/src/main/org/jboss/test/web/test/WebProgrammaticLoginTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/web/test/WebProgrammaticLoginTestCase.java	2007-11-23 16:51:55 UTC (rev 67416)
+++ trunk/testsuite/src/main/org/jboss/test/web/test/WebProgrammaticLoginTestCase.java	2007-11-23 17:38:04 UTC (rev 67417)
@@ -61,7 +61,8 @@
    {
       String baseURLNoAuth = "http://" + getServerHost() 
               + ":" + Integer.getInteger("web.port", 8080) + "/"; 
-      String path1 = "programmaticweblogin/TestServlet";
+      String path1 = "war1/TestServlet";
+      // try to perform programmatic auth without supplying login information.
       HttpMethod indexGet = null;
       try
       {
@@ -69,13 +70,16 @@
          int responseCode = httpConn.executeMethod(indexGet);
          assertTrue("Get Error("+responseCode+")", 
                responseCode == HttpURLConnection.HTTP_INTERNAL_ERROR);
+         // assert access to the second application is not granted, as no successful login
+         // was performed (and therefore no ssoid has been set).
+         SSOBaseCase.checkAccessDenied(this.httpConn, baseURLNoAuth + "war2/index.html");
       }
       finally
       {
          if(indexGet != null)
            indexGet.releaseConnection();
       } 
-      
+      // try to perform programmatic auth with no valid username/password.
       path1 = path1 + "?username=dummy&pass=dummy";
       try
       {
@@ -83,6 +87,7 @@
          int responseCode = httpConn.executeMethod(indexGet);
          assertTrue("Get Error("+responseCode+")", 
                responseCode == HttpURLConnection.HTTP_INTERNAL_ERROR);
+         SSOBaseCase.checkAccessDenied(this.httpConn, baseURLNoAuth + "war2/index.html");
       }
       finally
       {
@@ -99,13 +104,17 @@
    {
       String baseURLNoAuth = "http://" + getServerHost() 
               + ":" + Integer.getInteger("web.port", 8080) + "/"; 
-      String path1 = "programmaticweblogin/TestServlet?username=jduke&pass=theduke"; 
+      String path1 = "war1/TestServlet?username=jduke&pass=theduke"; 
       HttpMethod indexGet = null;
       try
       {
          indexGet = new GetMethod(baseURLNoAuth+path1); 
          int responseCode = httpConn.executeMethod(indexGet);
          assertTrue("Get OK("+responseCode+")", responseCode == HttpURLConnection.HTTP_OK);
+         // check the sso cookie has been created
+         SSOBaseCase.processSSOCookie(this.httpConn.getState(), baseURLNoAuth, baseURLNoAuth);
+         // check that access to the second application is allowed
+         SSOBaseCase.checkAccessAllowed(this.httpConn, baseURLNoAuth + "war2/index.html");
       }
       finally
       {

Modified: trunk/testsuite/src/resources/security-spi/rolemapping/web/WEB-INF/jboss-web.xml
===================================================================
--- trunk/testsuite/src/resources/security-spi/rolemapping/web/WEB-INF/jboss-web.xml	2007-11-23 16:51:55 UTC (rev 67416)
+++ trunk/testsuite/src/resources/security-spi/rolemapping/web/WEB-INF/jboss-web.xml	2007-11-23 17:38:04 UTC (rev 67417)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE jboss-web
     PUBLIC "-//JBoss//DTD Web Application 2.4//EN"
-    "http://www.jboss.org/j2ee/dtds/jboss-web_4_0.dtd">
+    "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
 
 <jboss-web>
    <!-- Specify the security domain for authentication/authorization and

Modified: trunk/testsuite/src/resources/securitymgr/war1/jboss-web.xml
===================================================================
--- trunk/testsuite/src/resources/securitymgr/war1/jboss-web.xml	2007-11-23 16:51:55 UTC (rev 67416)
+++ trunk/testsuite/src/resources/securitymgr/war1/jboss-web.xml	2007-11-23 17:38:04 UTC (rev 67417)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE jboss-web
     PUBLIC "-//JBoss//DTD Web Application 2.4//EN"
-    "http://www.jboss.org/j2ee/dtds/jboss-web_4_0.dtd">
+    "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
 
 <jboss-web>
    <security-domain>

Modified: trunk/testsuite/src/resources/web/custom-principal/WEB-INF/jboss-web.xml
===================================================================
--- trunk/testsuite/src/resources/web/custom-principal/WEB-INF/jboss-web.xml	2007-11-23 16:51:55 UTC (rev 67416)
+++ trunk/testsuite/src/resources/web/custom-principal/WEB-INF/jboss-web.xml	2007-11-23 17:38:04 UTC (rev 67417)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE jboss-web
    PUBLIC "-//JBoss//DTD Web Application 2.4//EN"
-   "http://www.jboss.org/j2ee/dtds/jboss-web_4_0.dtd">
+   "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
 <jboss-web>
    <security-domain>java:/jaas/jaas-testpropagation</security-domain>
 </jboss-web>

Modified: trunk/testsuite/src/resources/web/federation/authext/header-auth/WEB-INF/jboss-web.xml
===================================================================
--- trunk/testsuite/src/resources/web/federation/authext/header-auth/WEB-INF/jboss-web.xml	2007-11-23 16:51:55 UTC (rev 67416)
+++ trunk/testsuite/src/resources/web/federation/authext/header-auth/WEB-INF/jboss-web.xml	2007-11-23 17:38:04 UTC (rev 67417)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE jboss-web
     PUBLIC "-//JBoss//DTD Web Application 2.4//EN"
-    "http://www.jboss.org/j2ee/dtds/jboss-web_4_0.dtd">
+    "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
 
 <jboss-web>
   <context-root>/header-auth</context-root> 

Modified: trunk/testsuite/src/resources/web/federation/genericheader/jboss-web.xml
===================================================================
--- trunk/testsuite/src/resources/web/federation/genericheader/jboss-web.xml	2007-11-23 16:51:55 UTC (rev 67416)
+++ trunk/testsuite/src/resources/web/federation/genericheader/jboss-web.xml	2007-11-23 17:38:04 UTC (rev 67417)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE jboss-web
     PUBLIC "-//JBoss//DTD Web Application 2.4//EN"
-    "http://www.jboss.org/j2ee/dtds/jboss-web_4_0.dtd">
+    "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
 
 <jboss-web>
    <!-- Specify the security domain for authentication/authorization and

Modified: trunk/testsuite/src/resources/web/form-auth/jboss-web.xml
===================================================================
--- trunk/testsuite/src/resources/web/form-auth/jboss-web.xml	2007-11-23 16:51:55 UTC (rev 67416)
+++ trunk/testsuite/src/resources/web/form-auth/jboss-web.xml	2007-11-23 17:38:04 UTC (rev 67417)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE jboss-web
     PUBLIC "-//JBoss//DTD Web Application 2.4//EN"
-    "http://www.jboss.org/j2ee/dtds/jboss-web_4_0.dtd">
+    "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
 
 <jboss-web>
    <!-- Specify the security domain for authentication/authorization and

Modified: trunk/testsuite/src/resources/web/html/bad/WEB-INF/jboss-web.xml
===================================================================
--- trunk/testsuite/src/resources/web/html/bad/WEB-INF/jboss-web.xml	2007-11-23 16:51:55 UTC (rev 67416)
+++ trunk/testsuite/src/resources/web/html/bad/WEB-INF/jboss-web.xml	2007-11-23 17:38:04 UTC (rev 67417)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE jboss-web
     PUBLIC "-//JBoss//DTD Web Application 2.3//EN"
-    "http://www.jboss.org/j2ee/dtds/jboss-web_3_0.dtd">
+    "http://www.jboss.org/j2ee/dtd/jboss-web_3_0.dtd">
 
 <jboss-web>
     <context-root>/redeploy</context-root>

Modified: trunk/testsuite/src/resources/web/html/other/WEB-INF/jboss-web.xml
===================================================================
--- trunk/testsuite/src/resources/web/html/other/WEB-INF/jboss-web.xml	2007-11-23 16:51:55 UTC (rev 67416)
+++ trunk/testsuite/src/resources/web/html/other/WEB-INF/jboss-web.xml	2007-11-23 17:38:04 UTC (rev 67417)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE jboss-web
     PUBLIC "-//JBoss//DTD Web Application 2.3//EN"
-    "http://www.jboss.org/j2ee/dtds/jboss-web_3_0.dtd">
+    "http://www.jboss.org/j2ee/dtd/jboss-web_3_0.dtd">
 
 <jboss-web>
     <security-domain>java:/jaas/jbosstest-web</security-domain>

Modified: trunk/testsuite/src/resources/web/html/ssl/jboss-web.xml
===================================================================
--- trunk/testsuite/src/resources/web/html/ssl/jboss-web.xml	2007-11-23 16:51:55 UTC (rev 67416)
+++ trunk/testsuite/src/resources/web/html/ssl/jboss-web.xml	2007-11-23 17:38:04 UTC (rev 67417)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE jboss-web
     PUBLIC "-//JBoss//DTD Web Application 2.3//EN"
-    "http://www.jboss.org/j2ee/dtds/jboss-web_3_0.dtd">
+    "http://www.jboss.org/j2ee/dtd/jboss-web_3_0.dtd">
 
 <jboss-web>
     <security-domain>java:/jaas/jbosstest-ssl</security-domain>

Modified: trunk/testsuite/src/resources/web/jaspi-form-auth/jboss-web.xml
===================================================================
--- trunk/testsuite/src/resources/web/jaspi-form-auth/jboss-web.xml	2007-11-23 16:51:55 UTC (rev 67416)
+++ trunk/testsuite/src/resources/web/jaspi-form-auth/jboss-web.xml	2007-11-23 17:38:04 UTC (rev 67417)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE jboss-web
     PUBLIC "-//JBoss//DTD Web Application 2.4//EN"
-    "http://www.jboss.org/j2ee/dtds/jboss-web_4_0.dtd">
+    "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
 
 <jboss-web>
    <!-- Specify the security domain for authentication/authorization and

Modified: trunk/testsuite/src/resources/web/programmatic/WEB-INF/jboss-web.xml
===================================================================
--- trunk/testsuite/src/resources/web/programmatic/WEB-INF/jboss-web.xml	2007-11-23 16:51:55 UTC (rev 67416)
+++ trunk/testsuite/src/resources/web/programmatic/WEB-INF/jboss-web.xml	2007-11-23 17:38:04 UTC (rev 67417)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE jboss-web
+   PUBLIC "-//JBoss//DTD Web Application 2.4//EN"
+   "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
+	
+<jboss-web>
+   <security-domain>java:/jaas/jbosstest-web</security-domain>
+</jboss-web>
\ No newline at end of file

Modified: trunk/testsuite/src/resources/web/programmatic/application.xml
===================================================================
--- trunk/testsuite/src/resources/web/programmatic/application.xml	2007-11-23 16:51:55 UTC (rev 67416)
+++ trunk/testsuite/src/resources/web/programmatic/application.xml	2007-11-23 17:38:04 UTC (rev 67417)
@@ -5,12 +5,19 @@
 
 <application>
    <display-name>Programmatic Web Login</display-name>
-
-   <module>
-      <web>
-         <web-uri>programmaticweblogin.war</web-uri>
-         <context-root>programmaticweblogin</context-root>
-      </web>
-   </module>
-
+      <module>
+         <web>
+            <web-uri>programmaticweblogin.war</web-uri>
+            <context-root>/war1</context-root>
+         </web>
+      </module>
+      <module>
+         <web>
+            <web-uri>sso-form-auth.war</web-uri>
+            <context-root>/war2</context-root>
+         </web>
+      </module>
+      <module>
+         <ejb>jbosstest-web-ejbs.jar</ejb>
+      </module>
 </application>

Modified: trunk/testsuite/src/resources/web/simple-xmlonly/jboss-web.xml
===================================================================
--- trunk/testsuite/src/resources/web/simple-xmlonly/jboss-web.xml	2007-11-23 16:51:55 UTC (rev 67416)
+++ trunk/testsuite/src/resources/web/simple-xmlonly/jboss-web.xml	2007-11-23 17:38:04 UTC (rev 67417)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE jboss-web
     PUBLIC "-//JBoss//DTD Web Application 2.4//EN"
-    "http://www.jboss.org/j2ee/dtds/jboss-web_4_0.dtd">
+    "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
 
 <jboss-web>
     <resource-ref>

Modified: trunk/testsuite/src/resources/web/sso/war/jboss-web.xml
===================================================================
--- trunk/testsuite/src/resources/web/sso/war/jboss-web.xml	2007-11-23 16:51:55 UTC (rev 67416)
+++ trunk/testsuite/src/resources/web/sso/war/jboss-web.xml	2007-11-23 17:38:04 UTC (rev 67417)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE jboss-web
     PUBLIC "-//JBoss//DTD Web Application 2.3//EN"
-    "http://www.jboss.org/j2ee/dtds/jboss-web_3_2.dtd">
+    "http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd">
 
 <jboss-web>
    <security-domain>java:/jaas/jbosstest-web</security-domain>




More information about the jboss-cvs-commits mailing list