Author: cbrisson
Date: Sat Nov  5 02:23:43 2016
New Revision: 1768142

URL: http://svn.apache.org/viewvc?rev=1768142&view=rev
Log:
[tools] fix BrowserTool whitebox tests

Modified:
    velocity/tools/trunk/pom.xml
    velocity/tools/trunk/velocity-tools-view/pom.xml
    
velocity/tools/trunk/velocity-tools-view/src/test/java/org/apache/velocity/tools/view/BrowserToolTests.java

Modified: velocity/tools/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/velocity/tools/trunk/pom.xml?rev=1768142&r1=1768141&r2=1768142&view=diff
==============================================================================
--- velocity/tools/trunk/pom.xml (original)
+++ velocity/tools/trunk/pom.xml Sat Nov  5 02:23:43 2016
@@ -119,7 +119,6 @@
         <module>velocity-tools-generic</module>
         <module>velocity-tools-xml</module>
         <module>velocity-tools-view</module>
-        <module>velocity-tools-browser</module>
         <module>velocity-tools-view-jsp</module>
         <module>velocity-tools-struts</module>
         <module>velocity-tools-uberjar</module>

Modified: velocity/tools/trunk/velocity-tools-view/pom.xml
URL: 
http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/pom.xml?rev=1768142&r1=1768141&r2=1768142&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/pom.xml (original)
+++ velocity/tools/trunk/velocity-tools-view/pom.xml Sat Nov  5 02:23:43 2016
@@ -44,6 +44,16 @@
                         <include>**/*TestCase.java</include>
                         <include>**/*Tests.java</include>
                     </includes>
+                    <systemProperties>
+                        <property>
+                            <name>test.output.dir</name>
+                            <value>${project.build.testOutputDirectory}</value>
+                        </property>
+                        <property>
+                            <name>test.result.dir</name>
+                            <value>${project.build.directory}/results</value>
+                        </property>
+                      </systemProperties>
                 </configuration>
             </plugin>
         </plugins>
@@ -72,5 +82,58 @@
             <version>3.4</version>
             <scope>test</scope>
         </dependency>
+        <!-- to reuse the MockLogger from velocity-tools-generic -->
+        <dependency>
+            <groupId>org.apache.velocity</groupId>
+            <artifactId>velocity-tools-generic</artifactId>
+            <version>${project.version}</version>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 </project>
+
+
+  <build>
+    <defaultGoal>install</defaultGoal>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>${surefire.plugin.version}</version>
+        <configuration>
+          <skip>${maven.test.skip}</skip>
+          <systemProperties>
+            <property>
+              <name>test</name>
+              <value>${test}</value>
+            </property>
+            <property>
+              <name>test.output.dir</name>
+              <value>${project.build.testOutputDirectory}</value>
+            </property>
+            <property>
+              <name>test.result.dir</name>
+              <value>${project.build.directory}/results</value>
+            </property>
+            <property>
+              <name>org.slf4j.simpleLogger.defaultLogLevel</name>
+              <value>warn</value>
+              </property>
+          </systemProperties>
+        </configuration>
+        <executions>
+          <execution>
+            <id>integration-test</id>
+            <phase>integration-test</phase>
+            <goals>
+              <goal>test</goal>
+            </goals>
+            <configuration>
+              <skip>false</skip>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>

Modified: 
velocity/tools/trunk/velocity-tools-view/src/test/java/org/apache/velocity/tools/view/BrowserToolTests.java
URL: 
http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/test/java/org/apache/velocity/tools/view/BrowserToolTests.java?rev=1768142&r1=1768141&r2=1768142&view=diff
==============================================================================
--- 
velocity/tools/trunk/velocity-tools-view/src/test/java/org/apache/velocity/tools/view/BrowserToolTests.java
 (original)
+++ 
velocity/tools/trunk/velocity-tools-view/src/test/java/org/apache/velocity/tools/view/BrowserToolTests.java
 Sat Nov  5 02:23:43 2016
@@ -51,7 +51,7 @@ public class BrowserToolTests {
     protected Map<String, String> readUAs(String filename) throws Exception
     {
         Map result = new TreeMap<String, String>();
-        BufferedReader reader = new BufferedReader(new 
FileReader(TEST_OUTPUT_DIR + "/" + filename));
+        BufferedReader reader = new BufferedReader(new 
FileReader(TEST_OUTPUT_DIR + "/user-agents/" + filename));
         String line;
         while ((line = reader.readLine()) != null)
         {


Reply via email to