incubator-connectors-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1182152 - in /incubator/lcf/branches/CONNECTORS-256: connectors/wiki/ connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/ tests/wiki/src/test/java/org/apache/manifoldcf/wiki_tests/
Date Wed, 12 Oct 2011 00:34:29 GMT
Author: kwright
Date: Wed Oct 12 00:34:28 2011
New Revision: 1182152

URL: http://svn.apache.org/viewvc?rev=1182152&view=rev
Log:
Hook up more of the wiki ant-based test framework.

Added:
    incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/BaseDerby.java
      - copied, changed from r1182100, incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/Base.java
    incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/BaseHSQLDB.java
  (with props)
    incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/BasePostgresql.java
  (with props)
    incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/SanityDerbyTest.java
  (with props)
    incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/SanityHSQLDBTest.java
  (with props)
    incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/SanityPostgresqlTest.java
  (with props)
Removed:
    incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/Base.java
Modified:
    incubator/lcf/branches/CONNECTORS-256/connectors/wiki/build.xml
    incubator/lcf/branches/CONNECTORS-256/tests/wiki/src/test/java/org/apache/manifoldcf/wiki_tests/BaseDerby.java
    incubator/lcf/branches/CONNECTORS-256/tests/wiki/src/test/java/org/apache/manifoldcf/wiki_tests/MockWikiService.java

Modified: incubator/lcf/branches/CONNECTORS-256/connectors/wiki/build.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-256/connectors/wiki/build.xml?rev=1182152&r1=1182151&r2=1182152&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-256/connectors/wiki/build.xml (original)
+++ incubator/lcf/branches/CONNECTORS-256/connectors/wiki/build.xml Wed Oct 12 00:34:28 2011
@@ -20,6 +20,9 @@
     <target name="clean">
         <delete dir="build"/>
         <delete dir="dist"/>
+        <delete dir="test-output"/>
+        <delete dir="test-output-postgresql"/>
+        <delete dir="test-output-HSQLDB"/>
     </target>
 
     <target name="doc">
@@ -72,8 +75,10 @@
 
     <target name="build" depends="lib"/>
     
-    <target name="build-tests"/>
-    
+    <target name="build-tests" depends="jar-tests"/>
+
+    <target name="jar-tests" depends="jar-connector-tests"/>
+
     <target name="run-tests" depends="compile-tests"/>
     
     <target name="run-tests-derby" depends="compile-tests">
@@ -88,7 +93,9 @@
             </classpath>
             <formatter type="brief" usefile="false"/>
 
+            <test name="org.apache.manifoldcf.crawler.connectors.wiki.tests.SanityDerbyTest"
todir="test-output"/>
             <!-- MHL -->
+            
         </junit>
     </target>
     
@@ -102,7 +109,10 @@
                 <pathelement location="build/connector/classes"/>
                 <pathelement location="build/connector-tests/classes"/>
             </classpath>
+            
+            <test name="org.apache.manifoldcf.crawler.connectors.wiki.tests.SanityPostgresqlTest"
todir="test-output-postgresql"/>
             <!-- MHL -->
+            
         </junit>
     </target>
 
@@ -116,7 +126,10 @@
                 <pathelement location="build/connector/classes"/>
                 <pathelement location="build/connector-tests/classes"/>
             </classpath>
+            
+            <test name="org.apache.manifoldcf.crawler.connectors.wiki.tests.SanityHSQLDBTest"
todir="test-output-HSQLDB"/>
             <!-- MHL -->
+            
         </junit>
     </target>
     

Copied: incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/BaseDerby.java
(from r1182100, incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/Base.java)
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/BaseDerby.java?p2=incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/BaseDerby.java&p1=incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/Base.java&r1=1182100&r2=1182152&rev=1182152&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/Base.java
(original)
+++ incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/BaseDerby.java
Wed Oct 12 00:34:28 2011
@@ -25,8 +25,8 @@ import org.apache.manifoldcf.crawler.sys
 
 import org.junit.*;
 
-/** This is a testing base class that is responsible for setting up/tearing down the agents
framework. */
-public class Base extends org.apache.manifoldcf.crawler.tests.ConnectorBase
+/** This is a testing base class that is responsible for setting up/tearing down the connectors,
for derby. */
+public class BaseDerby extends org.apache.manifoldcf.crawler.tests.ConnectorBase
 {
   
   protected String[] getConnectorNames()

Added: incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/BaseHSQLDB.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/BaseHSQLDB.java?rev=1182152&view=auto
==============================================================================
--- incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/BaseHSQLDB.java
(added)
+++ incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/BaseHSQLDB.java
Wed Oct 12 00:34:28 2011
@@ -0,0 +1,44 @@
+/* $Id$ */
+
+/**
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.manifoldcf.crawler.connectors.wiki.tests;
+
+import org.apache.manifoldcf.core.interfaces.*;
+import org.apache.manifoldcf.agents.interfaces.*;
+import org.apache.manifoldcf.crawler.interfaces.*;
+import org.apache.manifoldcf.crawler.system.ManifoldCF;
+
+import java.io.*;
+import java.util.*;
+import org.junit.*;
+
+/** This is a testing base class that is responsible for setting up/tearing down the agents
framework. */
+public class BaseHSQLDB extends org.apache.manifoldcf.crawler.tests.ConnectorBaseHSQLDB
+{
+  
+  protected String[] getConnectorNames()
+  {
+    return new String[]{"Wiki Connector"};
+  }
+  
+  protected String[] getConnectorClasses()
+  {
+    return new String[]{"org.apache.manifoldcf.crawler.connectors.wiki.WikiConnector"};
+  }
+
+}

Propchange: incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/BaseHSQLDB.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/BaseHSQLDB.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/BasePostgresql.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/BasePostgresql.java?rev=1182152&view=auto
==============================================================================
--- incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/BasePostgresql.java
(added)
+++ incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/BasePostgresql.java
Wed Oct 12 00:34:28 2011
@@ -0,0 +1,44 @@
+/* $Id$ */
+
+/**
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.manifoldcf.crawler.connectors.wiki.tests;
+
+import org.apache.manifoldcf.core.interfaces.*;
+import org.apache.manifoldcf.agents.interfaces.*;
+import org.apache.manifoldcf.crawler.interfaces.*;
+import org.apache.manifoldcf.crawler.system.ManifoldCF;
+
+import java.io.*;
+import java.util.*;
+import org.junit.*;
+
+/** This is a testing base class that is responsible for setting up/tearing down the agents
framework. */
+public class BasePostgresql extends org.apache.manifoldcf.crawler.tests.ConnectorBasePostgresql
+{
+  
+  protected String[] getConnectorNames()
+  {
+    return new String[]{"Wiki Connector"};
+  }
+  
+  protected String[] getConnectorClasses()
+  {
+    return new String[]{"org.apache.manifoldcf.crawler.connectors.wiki.WikiConnector"};
+  }
+
+}

Propchange: incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/BasePostgresql.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/BasePostgresql.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/SanityDerbyTest.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/SanityDerbyTest.java?rev=1182152&view=auto
==============================================================================
--- incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/SanityDerbyTest.java
(added)
+++ incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/SanityDerbyTest.java
Wed Oct 12 00:34:28 2011
@@ -0,0 +1,42 @@
+/* $Id$ */
+
+/**
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.manifoldcf.crawler.connectors.wiki.tests;
+
+import org.apache.manifoldcf.core.interfaces.*;
+import org.apache.manifoldcf.agents.interfaces.*;
+import org.apache.manifoldcf.crawler.interfaces.*;
+import org.apache.manifoldcf.crawler.system.ManifoldCF;
+
+import java.io.*;
+import java.util.*;
+import org.junit.*;
+
+/** This is a very basic sanity check */
+public class SanityDerbyTest extends BaseDerby
+{
+  
+  @Test
+  public void sanityCheck()
+    throws Exception
+  {
+    // If we get this far, it must mean that the setup was successful, which is all that
I'm shooting for in this test.
+  }
+  
+
+}

Propchange: incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/SanityDerbyTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/SanityDerbyTest.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/SanityHSQLDBTest.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/SanityHSQLDBTest.java?rev=1182152&view=auto
==============================================================================
--- incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/SanityHSQLDBTest.java
(added)
+++ incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/SanityHSQLDBTest.java
Wed Oct 12 00:34:28 2011
@@ -0,0 +1,42 @@
+/* $Id$ */
+
+/**
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.manifoldcf.crawler.connectors.wiki.tests;
+
+import org.apache.manifoldcf.core.interfaces.*;
+import org.apache.manifoldcf.agents.interfaces.*;
+import org.apache.manifoldcf.crawler.interfaces.*;
+import org.apache.manifoldcf.crawler.system.ManifoldCF;
+
+import java.io.*;
+import java.util.*;
+import org.junit.*;
+
+/** This is a very basic sanity check */
+public class SanityHSQLDBTest extends BaseHSQLDB
+{
+  
+  @Test
+  public void sanityCheck()
+    throws Exception
+  {
+    // If we get this far, it must mean that the setup was successful, which is all that
I'm shooting for in this test.
+  }
+  
+
+}

Propchange: incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/SanityHSQLDBTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/SanityHSQLDBTest.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/SanityPostgresqlTest.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/SanityPostgresqlTest.java?rev=1182152&view=auto
==============================================================================
--- incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/SanityPostgresqlTest.java
(added)
+++ incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/SanityPostgresqlTest.java
Wed Oct 12 00:34:28 2011
@@ -0,0 +1,42 @@
+/* $Id$ */
+
+/**
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.manifoldcf.crawler.connectors.wiki.tests;
+
+import org.apache.manifoldcf.core.interfaces.*;
+import org.apache.manifoldcf.agents.interfaces.*;
+import org.apache.manifoldcf.crawler.interfaces.*;
+import org.apache.manifoldcf.crawler.system.ManifoldCF;
+
+import java.io.*;
+import java.util.*;
+import org.junit.*;
+
+/** This is a very basic sanity check */
+public class SanityPostgresqlTest extends BasePostgresql
+{
+  
+  @Test
+  public void sanityCheck()
+    throws Exception
+  {
+    // If we get this far, it must mean that the setup was successful, which is all that
I'm shooting for in this test.
+  }
+  
+
+}

Propchange: incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/SanityPostgresqlTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/lcf/branches/CONNECTORS-256/connectors/wiki/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/wiki/tests/SanityPostgresqlTest.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: incubator/lcf/branches/CONNECTORS-256/tests/wiki/src/test/java/org/apache/manifoldcf/wiki_tests/BaseDerby.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-256/tests/wiki/src/test/java/org/apache/manifoldcf/wiki_tests/BaseDerby.java?rev=1182152&r1=1182151&r2=1182152&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-256/tests/wiki/src/test/java/org/apache/manifoldcf/wiki_tests/BaseDerby.java
(original)
+++ incubator/lcf/branches/CONNECTORS-256/tests/wiki/src/test/java/org/apache/manifoldcf/wiki_tests/BaseDerby.java
Wed Oct 12 00:34:28 2011
@@ -39,7 +39,7 @@ import org.apache.commons.httpclient.*;
 import org.apache.commons.httpclient.methods.*;
 
 /** Tests that run the "agents daemon" should be derived from this */
-public class Base extends org.apache.manifoldcf.crawler.tests.ConnectorBase
+public class BaseDerby extends org.apache.manifoldcf.crawler.tests.ConnectorBase
 {
   public static final String agentShutdownSignal = "agent-process";
   public static final int testPort = 8346;

Modified: incubator/lcf/branches/CONNECTORS-256/tests/wiki/src/test/java/org/apache/manifoldcf/wiki_tests/MockWikiService.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-256/tests/wiki/src/test/java/org/apache/manifoldcf/wiki_tests/MockWikiService.java?rev=1182152&r1=1182151&r2=1182152&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-256/tests/wiki/src/test/java/org/apache/manifoldcf/wiki_tests/MockWikiService.java
(original)
+++ incubator/lcf/branches/CONNECTORS-256/tests/wiki/src/test/java/org/apache/manifoldcf/wiki_tests/MockWikiService.java
Wed Oct 12 00:34:28 2011
@@ -69,7 +69,7 @@ public class MockWikiService
       if (action != null)
       {
         if (!action.equals("query"))
-          throw new IOException("Action parameter incorrect: "+query);
+          throw new IOException("Action parameter incorrect: "+action);
         String prop = req.getParameter("prop");
         String pageIds = req.getParameter("pageids");
         String rvprop = req.getParameter("rvprop");



Mime
View raw message