manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1225325 - in /incubator/lcf/trunk: ./ tests/filesystem/ tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/
Date Wed, 28 Dec 2011 20:36:01 GMT
Author: kwright
Date: Wed Dec 28 20:36:01 2011
New Revision: 1225325

URL: http://svn.apache.org/viewvc?rev=1225325&view=rev
Log:
Add test for repository connections and authority connections.  Part of CONNECTORS-339.

Modified:
    incubator/lcf/trunk/build.xml
    incubator/lcf/trunk/tests/filesystem/pom.xml
    incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/BaseUIDerby.java
    incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/NavigationUI.java

Modified: incubator/lcf/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/build.xml?rev=1225325&r1=1225324&r2=1225325&view=diff
==============================================================================
--- incubator/lcf/trunk/build.xml (original)
+++ incubator/lcf/trunk/build.xml Wed Dec 28 20:36:01 2011
@@ -1946,11 +1946,12 @@
         </copy>
     </target>
 
-    <target name="calculate-filesystem-tests-condition" depends="calculate-filesystem-condition,calculate-nulloutput-condition">
+    <target name="calculate-filesystem-tests-condition" depends="calculate-filesystem-condition,calculate-nulloutput-condition,calculate-nullauthority-condition">
       <condition property="filesystem-tests.include">
         <and>
             <isset property="filesystem.include"/>
             <isset property="nulloutput.include"/>
+            <isset property="nullauthority.include"/>
         </and>
       </condition>
     </target>
@@ -2000,7 +2001,7 @@
       </condition>
     </target>
 
-    <target name="compile-filesystem-tests" depends="build-framework,build-filesystem-connector,build-nulloutput-connector,calculate-filesystem-tests-condition,build-tests-filesystem-connector,build-tests-nulloutput-connector"
if="filesystem-tests.include">
+    <target name="compile-filesystem-tests" depends="build-framework,build-filesystem-connector,build-nulloutput-connector,build-nullauthority-connector,calculate-filesystem-tests-condition,build-tests-filesystem-connector,build-tests-nulloutput-connector,build-tests-nullauthority-connector"
if="filesystem-tests.include">
         <mkdir dir="build/filesystem-tests/classes"/>
         <javac srcdir="tests/filesystem/src/test/java" destdir="build/filesystem-tests/classes"
target="1.5" source="1.5" debug="true" debuglevel="lines,vars,source">
             <classpath>
@@ -2028,6 +2029,12 @@
 	      <fileset dir="connectors/nulloutput/build/test-jar">
 		<include name="*.jar"/>
 	      </fileset>
+	      <fileset dir="connectors/nullauthority/build/jar">
+		<include name="*.jar"/>
+	      </fileset>
+	      <fileset dir="connectors/nullauthority/build/test-jar">
+		<include name="*.jar"/>
+	      </fileset>
             </classpath>
         </javac>
     </target>
@@ -2389,6 +2396,12 @@
 	      <fileset dir="connectors/nulloutput/build/test-jar">
 		<include name="*.jar"/>
 	      </fileset>
+	      <fileset dir="connectors/nullauthority/build/jar">
+		<include name="*.jar"/>
+	      </fileset>
+	      <fileset dir="connectors/nullauthority/build/test-jar">
+		<include name="*.jar"/>
+	      </fileset>
                 <pathelement location="build/filesystem-tests/classes"/>
             </classpath>
             <formatter type="brief" usefile="false"/>
@@ -2426,6 +2439,12 @@
 	      <fileset dir="connectors/nulloutput/build/test-jar">
 		<include name="*.jar"/>
 	      </fileset>
+	      <fileset dir="connectors/nullauthority/build/jar">
+		<include name="*.jar"/>
+	      </fileset>
+	      <fileset dir="connectors/nullauthority/build/test-jar">
+		<include name="*.jar"/>
+	      </fileset>
                 <pathelement location="build/filesystem-tests/classes"/>
             </classpath>
             <formatter type="brief" usefile="false"/>

Modified: incubator/lcf/trunk/tests/filesystem/pom.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/tests/filesystem/pom.xml?rev=1225325&r1=1225324&r2=1225325&view=diff
==============================================================================
--- incubator/lcf/trunk/tests/filesystem/pom.xml (original)
+++ incubator/lcf/trunk/tests/filesystem/pom.xml Wed Dec 28 20:36:01 2011
@@ -141,6 +141,12 @@
       <scope>test</scope>
     </dependency>
     <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>mcf-nullauthority-connector</artifactId>
+      <version>${project.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
       <groupId>org.mortbay.jetty</groupId>
       <artifactId>jetty</artifactId>
       <version>${jetty.version}</version>

Modified: incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/BaseUIDerby.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/BaseUIDerby.java?rev=1225325&r1=1225324&r2=1225325&view=diff
==============================================================================
--- incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/BaseUIDerby.java
(original)
+++ incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/BaseUIDerby.java
Wed Dec 28 20:36:01 2011
@@ -34,6 +34,16 @@ public class BaseUIDerby extends BaseDer
 {
   protected HTMLTester testerInstance = null;
   
+  protected String[] getAuthorityClasses()
+  {
+    return new String[]{"org.apache.manifoldcf.authorities.authorities.nullauthority.NullAuthority"};
+  }
+  
+  protected String[] getAuthorityNames()
+  {
+    return new String[]{"Null authority"};
+  }
+
   @Before
   public void setupHTMLTester()
     throws Exception

Modified: incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/NavigationUI.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/NavigationUI.java?rev=1225325&r1=1225324&r2=1225325&view=diff
==============================================================================
--- incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/NavigationUI.java
(original)
+++ incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/NavigationUI.java
Wed Dec 28 20:36:01 2011
@@ -81,8 +81,87 @@ public class NavigationUI extends BaseUI
     button = window.findButton(testerInstance.createStringDescription("Save this output connection"));
     button.click();
     
+    // Define a repository connection via the UI
+    window = testerInstance.findWindow(null);
+    link = window.findLink(testerInstance.createStringDescription("List repository connections"));
+    link.click();
+    window = testerInstance.findWindow(null);
+    link = window.findLink(testerInstance.createStringDescription("Add a connection"));
+    link.click();
+    // Fill in a name
+    window = testerInstance.findWindow(null);
+    form = window.findForm(testerInstance.createStringDescription("editconnection"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("connname"));
+    textarea.setValue(testerInstance.createStringDescription("MyRepositoryConnection"));
+    link = window.findLink(testerInstance.createStringDescription("Type tab"));
+    link.click();
+    // Select a type
+    window = testerInstance.findWindow(null);
+    form = window.findForm(testerInstance.createStringDescription("editconnection"));
+    selectbox = form.findSelectbox(testerInstance.createStringDescription("classname"));
+    selectbox.selectValue(testerInstance.createStringDescription("org.apache.manifoldcf.crawler.connectors.filesystem.FileConnector"));
+    button = window.findButton(testerInstance.createStringDescription("Continue to next page"));
+    button.click();
+    // Visit the Throttling tab
+    window = testerInstance.findWindow(null);
+    link = window.findLink(testerInstance.createStringDescription("Throttling tab"));
+    link.click();
+    // Go back to the Name tab
+    window = testerInstance.findWindow(null);
+    link = window.findLink(testerInstance.createStringDescription("Name tab"));
+    link.click();
+    // Now save the connection.
+    window = testerInstance.findWindow(null);
+    button = window.findButton(testerInstance.createStringDescription("Save this connection"));
+    button.click();
     
-    // MHL
+    // Define an authority connection via the UI
+    window = testerInstance.findWindow(null);
+    link = window.findLink(testerInstance.createStringDescription("List authorities"));
+    link.click();
+    window = testerInstance.findWindow(null);
+    link = window.findLink(testerInstance.createStringDescription("Add a new connection"));
+    link.click();
+    // Fill in a name
+    window = testerInstance.findWindow(null);
+    form = window.findForm(testerInstance.createStringDescription("editconnection"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("connname"));
+    textarea.setValue(testerInstance.createStringDescription("MyAuthorityConnection"));
+    link = window.findLink(testerInstance.createStringDescription("Type tab"));
+    link.click();
+    // Select a type
+    window = testerInstance.findWindow(null);
+    form = window.findForm(testerInstance.createStringDescription("editconnection"));
+    selectbox = form.findSelectbox(testerInstance.createStringDescription("classname"));
+    selectbox.selectValue(testerInstance.createStringDescription("org.apache.manifoldcf.authorities.authorities.nullauthority.NullAuthority"));
+    button = window.findButton(testerInstance.createStringDescription("Continue to next page"));
+    button.click();
+    // Go back to the Name tab
+    window = testerInstance.findWindow(null);
+    link = window.findLink(testerInstance.createStringDescription("Name tab"));
+    link.click();
+    // Now save the connection.
+    window = testerInstance.findWindow(null);
+    button = window.findButton(testerInstance.createStringDescription("Save this authority
connection"));
+    button.click();
+
+    // MHL to create and delete a job
+    
+    // Delete the authority connection
+    window = testerInstance.findWindow(null);
+    link = window.findLink(testerInstance.createStringDescription("List authorities"));
+    link.click();
+    window = testerInstance.findWindow(null);
+    link = window.findLink(testerInstance.createStringDescription("Delete MyAuthorityConnection"));
+    link.click();
+
+    // Delete the repository connection
+    window = testerInstance.findWindow(null);
+    link = window.findLink(testerInstance.createStringDescription("List repository connections"));
+    link.click();
+    window = testerInstance.findWindow(null);
+    link = window.findLink(testerInstance.createStringDescription("Delete MyRepositoryConnection"));
+    link.click();
     
     // Delete the output connection
     window = testerInstance.findWindow(null);



Mime
View raw message