Repository: ambari Updated Branches: refs/heads/trunk 5c7997f59 -> 3348a049b
AMBARI-19863 ADDENDUM Fix Log Search User Config bugs (mgergely) Change-Id: I0017d9576003930ffd95a3b5d3e65d254844f08f Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3348a049 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3348a049 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3348a049 Branch: refs/heads/trunk Commit: 3348a049b06b11506bc426f43da75541037998c7 Parents: 5c7997f Author: Miklos Gergely <[email protected]> Authored: Tue Feb 7 11:24:36 2017 +0100 Committer: Miklos Gergely <[email protected]> Committed: Tue Feb 7 11:24:36 2017 +0100 ---------------------------------------------------------------------- .../converter/UserConfigRequestQueryConverterTest.java | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/3348a049/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()); } }
