Original commit: elastic/x-pack-elasticsearch@24d22f2309
This commit is contained in:
Martijn van Groningen 2015-09-10 11:23:47 +02:00
parent 7eda007c46
commit 427891191f
1 changed files with 2 additions and 4 deletions

View File

@ -78,8 +78,7 @@ public class ShieldCachePermissionTests extends ShieldIntegTestCase {
@Test
public void testThatTermsFilterQueryDoesntLeakData() {
SearchResponse response = client().prepareSearch("data").setTypes("a").setQuery(QueryBuilders.filteredQuery(
QueryBuilders.matchAllQuery(),
SearchResponse response = client().prepareSearch("data").setTypes("a").setQuery(QueryBuilders.constantScoreQuery(
QueryBuilders.termsLookupQuery("token")
.lookupIndex("tokens")
.lookupType("tokens")
@ -91,8 +90,7 @@ public class ShieldCachePermissionTests extends ShieldIntegTestCase {
// Repeat with unauthorized user!!!!
try {
response = client().prepareSearch("data").setTypes("a").setQuery(QueryBuilders.filteredQuery(
QueryBuilders.matchAllQuery(),
response = client().prepareSearch("data").setTypes("a").setQuery(QueryBuilders.constantScoreQuery(
QueryBuilders.termsLookupQuery("token")
.lookupIndex("tokens")
.lookupType("tokens")