manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1460991 - /manifoldcf/integration/elasticsearch/trunk/src/test/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizerTest.java
Date Tue, 26 Mar 2013 06:54:49 GMT
Author: kwright
Date: Tue Mar 26 06:54:49 2013
New Revision: 1460991

URL: http://svn.apache.org/r1460991
Log:
Aha, the problem is that the default values are not working.

Modified:
    manifoldcf/integration/elasticsearch/trunk/src/test/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizerTest.java

Modified: manifoldcf/integration/elasticsearch/trunk/src/test/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizerTest.java
URL: http://svn.apache.org/viewvc/manifoldcf/integration/elasticsearch/trunk/src/test/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizerTest.java?rev=1460991&r1=1460990&r2=1460991&view=diff
==============================================================================
--- manifoldcf/integration/elasticsearch/trunk/src/test/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizerTest.java
(original)
+++ manifoldcf/integration/elasticsearch/trunk/src/test/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizerTest.java
Tue Mar 26 06:54:49 2013
@@ -89,6 +89,14 @@ public class MCFAuthorizerTest
   @Test
   public void simpleTest() throws Exception
   {
+    // Sanity check to be sure I indexed everything right...
+    SearchResponse allResponse = client.prepareSearch("test").setQuery(QueryBuilders.matchAllQuery()).execute().actionGet();
+    verifyResponse(allResponse, "da12", "da13-dd3", "sa123-sd13", "sa3-sd1-da23", "notoken");
+    SearchResponse partialResponse = client.prepareSearch("test").setQuery(QueryBuilders.termQuery("allow_token_share","token1")).execute().actionGet();
+    verifyResponse(partialResponse, "sa123-sd13");
+    SearchResponse nullResponse = client.prepareSearch("test").setQuery(QueryBuilders.termQuery("allow_token_share","__nosecurity__")).execute().actionGet();
+    verifyResponse(nullResponse, "da12", "da13-dd3", "notoken");
+
     ConfigurationParameters cp = new ConfigurationParameters();
     MCFAuthorizer mcfa = new MCFAuthorizer(cp);
     FilterBuilder user1Filter = mcfa.buildAuthorizationFilter("user1");
@@ -96,11 +104,6 @@ public class MCFAuthorizerTest
     FilterBuilder user3Filter = mcfa.buildAuthorizationFilter("user3");
     FilterBuilder user4Filter = mcfa.buildAuthorizationFilter("user4");
     
-    // Sanity check to be sure I indexed everything right...
-    SearchResponse allResponse = client.prepareSearch("test").setQuery(QueryBuilders.matchAllQuery()).execute().actionGet();
-    verifyResponse(allResponse, "da12", "da13-dd3", "sa123-sd13", "sa3-sd1-da23", "notoken");
-    SearchResponse partialResponse = client.prepareSearch("test").setQuery(QueryBuilders.termQuery("allow_token_share","token1")).execute().actionGet();
-    verifyResponse(partialResponse, "sa123-sd13");
     // Ok, check the filters I built.
     SearchResponse user1Response = client.prepareSearch("test").setQuery(QueryBuilders.matchAllQuery()).setFilter(user1Filter).execute().actionGet();
     verifyResponse(user1Response, "da12", "da13-dd3", "notoken");



Mime
View raw message