You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by kw...@apache.org on 2012/12/09 18:14:13 UTC
svn commit: r1419021 - in /manifoldcf/branches/CONNECTORS-566: build.xml
tests/jdbc/src/test/java/org/apache/manifoldcf/jdbc_tests/BaseUIDerby.java
tests/jdbc/src/test/java/org/apache/manifoldcf/jdbc_tests/NavigationDerbyUI.java
Author: kwright
Date: Sun Dec 9 17:14:12 2012
New Revision: 1419021
URL: http://svn.apache.org/viewvc?rev=1419021&view=rev
Log:
Add tests, and inclusion in the build.xml file.
Modified:
manifoldcf/branches/CONNECTORS-566/build.xml
manifoldcf/branches/CONNECTORS-566/tests/jdbc/src/test/java/org/apache/manifoldcf/jdbc_tests/BaseUIDerby.java
manifoldcf/branches/CONNECTORS-566/tests/jdbc/src/test/java/org/apache/manifoldcf/jdbc_tests/NavigationDerbyUI.java
Modified: manifoldcf/branches/CONNECTORS-566/build.xml
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-566/build.xml?rev=1419021&r1=1419020&r2=1419021&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-566/build.xml (original)
+++ manifoldcf/branches/CONNECTORS-566/build.xml Sun Dec 9 17:14:12 2012
@@ -1576,6 +1576,11 @@
<param name="connector-label" value="JDBC"/>
<param name="connector-class" value="org.apache.manifoldcf.crawler.connectors.jdbc.JDBCConnector"/>
</antcall>
+ <antcall target="general-add-authority-connector">
+ <param name="connector-name" value="jdbc"/>
+ <param name="connector-label" value="JDBC"/>
+ <param name="connector-class" value="org.apache.manifoldcf.authorities.authorities.jdbc.JDBCAuthority"/>
+ </antcall>
</target>
<target name="deliver-jdbc-connector-doc" depends="calculate-jdbc-doc-condition" if="jdbc-doc.include">
Modified: manifoldcf/branches/CONNECTORS-566/tests/jdbc/src/test/java/org/apache/manifoldcf/jdbc_tests/BaseUIDerby.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-566/tests/jdbc/src/test/java/org/apache/manifoldcf/jdbc_tests/BaseUIDerby.java?rev=1419021&r1=1419020&r2=1419021&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-566/tests/jdbc/src/test/java/org/apache/manifoldcf/jdbc_tests/BaseUIDerby.java (original)
+++ manifoldcf/branches/CONNECTORS-566/tests/jdbc/src/test/java/org/apache/manifoldcf/jdbc_tests/BaseUIDerby.java Sun Dec 9 17:14:12 2012
@@ -30,24 +30,40 @@ import org.junit.*;
/** Tests that run the "agents daemon" should be derived from this */
public class BaseUIDerby extends org.apache.manifoldcf.crawler.tests.ConnectorBaseUIDerby
{
+ @Override
protected String[] getConnectorNames()
{
return new String[]{"JDBC Connector"};
}
+ @Override
protected String[] getConnectorClasses()
{
return new String[]{"org.apache.manifoldcf.crawler.connectors.jdbc.JDBCConnector"};
}
+ @Override
protected String[] getOutputNames()
{
return new String[]{"Null Output"};
}
+ @Override
protected String[] getOutputClasses()
{
return new String[]{"org.apache.manifoldcf.agents.output.nullconnector.NullConnector"};
}
+ @Override
+ protected String[] getAuthorityNames()
+ {
+ return new String[]{"JDBC Authority"};
+ }
+
+ @Override
+ protected String[] getAuthorityClasses()
+ {
+ return new String[]{"org.apache.manifoldcf.authorities.authorities.jdbc.JDBCAuthority"};
+ }
+
}
Modified: manifoldcf/branches/CONNECTORS-566/tests/jdbc/src/test/java/org/apache/manifoldcf/jdbc_tests/NavigationDerbyUI.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-566/tests/jdbc/src/test/java/org/apache/manifoldcf/jdbc_tests/NavigationDerbyUI.java?rev=1419021&r1=1419020&r2=1419021&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-566/tests/jdbc/src/test/java/org/apache/manifoldcf/jdbc_tests/NavigationDerbyUI.java (original)
+++ manifoldcf/branches/CONNECTORS-566/tests/jdbc/src/test/java/org/apache/manifoldcf/jdbc_tests/NavigationDerbyUI.java Sun Dec 9 17:14:12 2012
@@ -206,6 +206,70 @@ public class NavigationDerbyUI extends B
link = window.findLink(testerInstance.createStringDescription("Delete MyOutputConnection"));
link.click();
+ // Now go on to execute the authority test
+
+ window = testerInstance.openMainWindow("http://localhost:8346/mcf-crawler-ui/index.jsp");
+
+ // 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.jdbc.JDBCAuthority"));
+ button = window.findButton(testerInstance.createStringDescription("Continue to next page"));
+ button.click();
+ // Credentials tab
+ window = testerInstance.findWindow(null);
+ link = window.findLink(testerInstance.createStringDescription("Credentials tab"));
+ link.click();
+ window = testerInstance.findWindow(null);
+ form = window.findForm(testerInstance.createStringDescription("editconnection"));
+ textarea = form.findTextarea(testerInstance.createStringDescription("username"));
+ textarea.setValue(testerInstance.createStringDescription("foo"));
+ // Server
+ link = window.findLink(testerInstance.createStringDescription("Server tab"));
+ link.click();
+ window = testerInstance.findWindow(null);
+ form = window.findForm(testerInstance.createStringDescription("editconnection"));
+ // Database Type
+ link = window.findLink(testerInstance.createStringDescription("Database Type tab"));
+ link.click();
+ // Visit all the connector tabs.
+ // Queries
+ window = testerInstance.findWindow(null);
+ form = window.findForm(testerInstance.createStringDescription("editconnection"));
+ link = window.findLink(testerInstance.createStringDescription("Queries 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 authority connection"));
+ button.click();
+
+ // 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();
+
testerInstance.executeTest();
}