tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1224896 - in /tomcat/sandbox/trunk-mvn-build/tomcat-tests: ./ src/test/java/org/apache/catalina/startup/ src/test/java/org/apache/tomcat/util/net/
Date Tue, 27 Dec 2011 11:26:39 GMT
Author: olamy
Date: Tue Dec 27 11:26:38 2011
New Revision: 1224896

URL: http://svn.apache.org/viewvc?rev=1224896&view=rev
Log:
start fixing some tests due to path change

Modified:
    tomcat/sandbox/trunk-mvn-build/tomcat-tests/pom.xml
    tomcat/sandbox/trunk-mvn-build/tomcat-tests/src/test/java/org/apache/catalina/startup/LoggingBaseTest.java
    tomcat/sandbox/trunk-mvn-build/tomcat-tests/src/test/java/org/apache/tomcat/util/net/TestSsl.java
    tomcat/sandbox/trunk-mvn-build/tomcat-tests/src/test/java/org/apache/tomcat/util/net/TesterSupport.java

Modified: tomcat/sandbox/trunk-mvn-build/tomcat-tests/pom.xml
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-mvn-build/tomcat-tests/pom.xml?rev=1224896&r1=1224895&r2=1224896&view=diff
==============================================================================
--- tomcat/sandbox/trunk-mvn-build/tomcat-tests/pom.xml (original)
+++ tomcat/sandbox/trunk-mvn-build/tomcat-tests/pom.xml Tue Dec 27 11:26:38 2011
@@ -89,6 +89,12 @@
       <version>${project.version}</version>
     </dependency>
     <dependency>
+      <groupId>org.apache.tomcat.webapps</groupId>
+      <artifactId>examples</artifactId>
+      <version>${project.version}</version>
+      <type>war</type>
+    </dependency>
+    <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <version>4.10</version>
@@ -99,6 +105,17 @@
 
 
   <build>
+    <testResources>
+      <testResource>
+        <directory>src/test/resources</directory>
+      </testResource>
+      <testResource>
+        <directory>src/test/java</directory>
+        <includes>
+          <include>**/*.properties</include>
+        </includes>
+      </testResource>
+    </testResources>
     <plugins>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
@@ -112,6 +129,68 @@
             <tomcat.test.accesslog>true</tomcat.test.accesslog>
           </systemPropertyVariables>
         </configuration>
+        <executions>
+          <execution>
+            <id>bio-test</id>
+            <goals>
+              <goal>test</goal>
+            </goals>
+            <phase>test</phase>
+            <configuration>
+              <systemPropertyVariables>
+                <org.apache.juli.formatter>java.util.logging.SimpleFormatter</org.apache.juli.formatter>
+                <tomcat.test.temp>${project.build.directory}</tomcat.test.temp>
+                <!-- fixme configurable -->
+                <tomcat.test.accesslog>true</tomcat.test.accesslog>
+                <tomcat.test.protocol></tomcat.test.protocol>
+              </systemPropertyVariables>
+            </configuration>
+
+          </execution>
+          <execution>
+            <id>nio-test</id>
+            <goals>
+              <goal>test</goal>
+            </goals>
+            <phase>test</phase>
+            <configuration>
+              <systemPropertyVariables>
+                <org.apache.juli.formatter>java.util.logging.SimpleFormatter</org.apache.juli.formatter>
+                <tomcat.test.temp>${project.build.directory}</tomcat.test.temp>
+                <!-- fixme configurable -->
+                <tomcat.test.accesslog>true</tomcat.test.accesslog>
+                <tomcat.test.protocol>Nio</tomcat.test.protocol>
+              </systemPropertyVariables>
+            </configuration>
+
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <version>2.4</version>
+        <executions>
+          <execution>
+            <id>unpack-examples-war</id>
+            <goals>
+              <goal>unpack</goal>
+            </goals>
+            <phase>compile</phase>
+            <configuration>
+              <artifactItems>
+                <artifactItem>
+                  <groupId>org.apache.tomcat.webapps</groupId>
+                  <artifactId>examples</artifactId>
+                  <version>${project.version}</version>
+                  <type>war</type>
+                  <overWrite>false</overWrite>
+                  <outputDirectory>${project.build.directory}/examples</outputDirectory>
+                </artifactItem>
+              </artifactItems>
+            </configuration>
+          </execution>
+        </executions>
       </plugin>
     </plugins>
   </build>

Modified: tomcat/sandbox/trunk-mvn-build/tomcat-tests/src/test/java/org/apache/catalina/startup/LoggingBaseTest.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-mvn-build/tomcat-tests/src/test/java/org/apache/catalina/startup/LoggingBaseTest.java?rev=1224896&r1=1224895&r2=1224896&view=diff
==============================================================================
--- tomcat/sandbox/trunk-mvn-build/tomcat-tests/src/test/java/org/apache/catalina/startup/LoggingBaseTest.java
(original)
+++ tomcat/sandbox/trunk-mvn-build/tomcat-tests/src/test/java/org/apache/catalina/startup/LoggingBaseTest.java
Tue Dec 27 11:26:38 2011
@@ -56,7 +56,7 @@ public abstract class LoggingBaseTest {
      */
     public File getBuildDirectory() {
         return new File(System.getProperty("tomcat.test.tomcatbuild",
-                "output/build"));
+                "target"));
     }
 
     /**

Modified: tomcat/sandbox/trunk-mvn-build/tomcat-tests/src/test/java/org/apache/tomcat/util/net/TestSsl.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-mvn-build/tomcat-tests/src/test/java/org/apache/tomcat/util/net/TestSsl.java?rev=1224896&r1=1224895&r2=1224896&view=diff
==============================================================================
--- tomcat/sandbox/trunk-mvn-build/tomcat-tests/src/test/java/org/apache/tomcat/util/net/TestSsl.java
(original)
+++ tomcat/sandbox/trunk-mvn-build/tomcat-tests/src/test/java/org/apache/tomcat/util/net/TestSsl.java
Tue Dec 27 11:26:38 2011
@@ -52,7 +52,7 @@ public class TestSsl extends TomcatBaseT
 
         Tomcat tomcat = getTomcatInstance();
 
-        File appDir = new File(getBuildDirectory(), "webapps/examples");
+        File appDir = new File(getBuildDirectory(), "examples");
         tomcat.addWebapp(null, "/examples", appDir.getAbsolutePath());
 
         TesterSupport.initSsl(tomcat);
@@ -69,7 +69,7 @@ public class TestSsl extends TomcatBaseT
 
         Tomcat tomcat = getTomcatInstance();
 
-        File appDir = new File(getBuildDirectory(), "webapps/examples");
+        File appDir = new File(getBuildDirectory(), "examples");
         tomcat.addWebapp(null, "/examples", appDir.getAbsolutePath());
 
         TesterSupport.initSsl(tomcat, "localhost-copy1.jks", "changeit",
@@ -95,7 +95,7 @@ public class TestSsl extends TomcatBaseT
 
         Tomcat tomcat = getTomcatInstance();
 
-        File appDir = new File(getBuildDirectory(), "webapps/examples");
+        File appDir = new File(getBuildDirectory(), "examples");
         // app dir is relative to server home
         tomcat.addWebapp(null, "/examples", appDir.getAbsolutePath());
 
@@ -160,7 +160,7 @@ public class TestSsl extends TomcatBaseT
             return;
         }
 
-        File appDir = new File(getBuildDirectory(), "webapps/examples");
+        File appDir = new File(getBuildDirectory(), "examples");
         // app dir is relative to server home
         tomcat.addWebapp(null, "/examples", appDir.getAbsolutePath());
 

Modified: tomcat/sandbox/trunk-mvn-build/tomcat-tests/src/test/java/org/apache/tomcat/util/net/TesterSupport.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-mvn-build/tomcat-tests/src/test/java/org/apache/tomcat/util/net/TesterSupport.java?rev=1224896&r1=1224895&r2=1224896&view=diff
==============================================================================
--- tomcat/sandbox/trunk-mvn-build/tomcat-tests/src/test/java/org/apache/tomcat/util/net/TesterSupport.java
(original)
+++ tomcat/sandbox/trunk-mvn-build/tomcat-tests/src/test/java/org/apache/tomcat/util/net/TesterSupport.java
Tue Dec 27 11:26:38 2011
@@ -89,11 +89,11 @@ public final class TesterSupport {
             Connector connector = tomcat.getConnector();
             connector.setProperty("sslProtocol", "tls");
             File keystoreFile =
-                new File("test/org/apache/tomcat/util/net/" + keystore);
+                new File("src/test/java/org/apache/tomcat/util/net/" + keystore);
             connector.setAttribute("keystoreFile",
                     keystoreFile.getAbsolutePath());
             File truststoreFile = new File(
-                    "test/org/apache/tomcat/util/net/ca.jks");
+                    "src/test/java/org/apache/tomcat/util/net/ca.jks");
             connector.setAttribute("truststoreFile",
                     truststoreFile.getAbsolutePath());
             if (keystorePass != null) {
@@ -104,11 +104,11 @@ public final class TesterSupport {
             }
         } else {
             File keystoreFile = new File(
-                    "test/org/apache/tomcat/util/net/localhost-cert.pem");
+                    "src/test/java/org/apache/tomcat/util/net/localhost-cert.pem");
             tomcat.getConnector().setAttribute("SSLCertificateFile",
                     keystoreFile.getAbsolutePath());
             keystoreFile = new File(
-                    "test/org/apache/tomcat/util/net/localhost-key.pem");
+                    "src/test/java/org/apache/tomcat/util/net/localhost-key.pem");
             tomcat.getConnector().setAttribute("SSLCertificateKeyFile",
                     keystoreFile.getAbsolutePath());
         }
@@ -119,7 +119,7 @@ public final class TesterSupport {
     protected static KeyManager[] getUser1KeyManagers() throws Exception {
         KeyManagerFactory kmf = KeyManagerFactory.getInstance(
                 KeyManagerFactory.getDefaultAlgorithm());
-        kmf.init(getKeyStore("test/org/apache/tomcat/util/net/user1.jks"),
+        kmf.init(getKeyStore("src/test/java/org/apache/tomcat/util/net/user1.jks"),
                 "changeit".toCharArray());
         return kmf.getKeyManagers();
     }
@@ -127,7 +127,7 @@ public final class TesterSupport {
     protected static TrustManager[] getTrustManagers() throws Exception {
         TrustManagerFactory tmf = TrustManagerFactory.getInstance(
                 TrustManagerFactory.getDefaultAlgorithm());
-        tmf.init(getKeyStore("test/org/apache/tomcat/util/net/ca.jks"));
+        tmf.init(getKeyStore("src/test/java/org/apache/tomcat/util/net/ca.jks"));
         return tmf.getTrustManagers();
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message