Repository: ambari Updated Branches: refs/heads/branch-2.5 776e0dfb1 -> ea50bd7b6
AMBARI-19863 ADDENDUM Fix Log Search User Config bugs (mgergely) Change-Id: I929e2f07128cfcd5b0ce710e282c75384b4aac0d Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ea50bd7b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ea50bd7b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ea50bd7b Branch: refs/heads/branch-2.5 Commit: ea50bd7b68caf590dadd26bae182c46734985ccb Parents: 776e0df Author: Miklos Gergely <[email protected]> Authored: Tue Feb 7 11:25:10 2017 +0100 Committer: Miklos Gergely <[email protected]> Committed: Tue Feb 7 11:25:10 2017 +0100 ---------------------------------------------------------------------- .../converter/UserConfigRequestQueryConverterTest.java | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/ea50bd7b/ambari-logsearch/ambari-logsearch-portal/src/test/java/org/apache/ambari/logsearch/converter/UserConfigRequestQueryConverterTest.java ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-portal/src/test/java/org/apache/ambari/logsearch/converter/UserConfigRequestQueryConverterTest.java b/ambari-logsearch/ambari-logsearch-portal/src/test/java/org/apache/ambari/logsearch/converter/UserConfigRequestQueryConverterTest.java index a126df8..cbfab4f 100644 --- a/ambari-logsearch/ambari-logsearch-portal/src/test/java/org/apache/ambari/logsearch/converter/UserConfigRequestQueryConverterTest.java +++ b/ambari-logsearch/ambari-logsearch-portal/src/test/java/org/apache/ambari/logsearch/converter/UserConfigRequestQueryConverterTest.java @@ -18,9 +18,7 @@ */ package org.apache.ambari.logsearch.converter; -import org.apache.ambari.logsearch.common.LogSearchContext; import org.apache.ambari.logsearch.model.request.impl.UserConfigRequest; -import org.apache.ambari.logsearch.web.model.User; import org.apache.solr.client.solrj.SolrQuery; import org.junit.Before; import org.junit.Test; @@ -42,17 +40,10 @@ public class UserConfigRequestQueryConverterTest extends AbstractRequestConverte UserConfigRequest request = new UserConfigRequest(); request.setRowType("myRowType"); // TODO: validate these 3 fields @Valid on UserConfigRequest object -> not null request.setFilterName("myFilterName"); - - LogSearchContext context = new LogSearchContext(); - User user = new User(); - user.setUsername("myUserId"); - context.setUser(user); - LogSearchContext.setContext(context); // WHEN SolrQuery queryResult = underTest.convert(request); // THEN - assertEquals("?q=*%3A*&fq=rowtype%3AmyRowType&fq=username%3AmyUserId+OR+share_username_list%3AmyUserId" + - "&fq=filtername%3A*myFilterName*&start=0&rows=10&sort=filtername+asc", + assertEquals("?q=*%3A*&fq=rowtype%3AmyRowType&fq=filtername%3A*myFilterName*&start=0&rows=10&sort=filtername+asc", queryResult.toQueryString()); } }
