Merge branch 'stable-2.14' into stable-2.15

* stable-2.14:
  doc: fix the example of index activate command
  doc: add groups index to index activate command
  AbstractQueryChangesTest: explicitly cover is:owner
  AbstractQueryChangesTest: Add stub test for "query:" predicate
  Fix internal errors when 'destination:' refers to non-existing destination
  lib/elasticsearch: restore jackson_dataformat_smile

Change-Id: If2336eba372f4ceb476e08181cfac9f966466ac5
This commit is contained in:
David Pursehouse
2018-04-17 07:18:20 +02:00
7 changed files with 38 additions and 2 deletions

View File

@@ -646,6 +646,7 @@ public abstract class AbstractQueryChangesTest extends GerritServerTests {
accountManager.authenticate(AuthRequest.forUser("anotheruser")).getAccountId();
Change change2 = insert(repo, newChange(repo), user2);
assertQuery("is:owner", change1);
assertQuery("owner:" + userId.get(), change1);
assertQuery("owner:" + user2, change2);
@@ -2501,6 +2502,24 @@ public abstract class AbstractQueryChangesTest extends GerritServerTests {
assertQuery("-assignee:" + user.getUserName(), change2);
}
@Test
public void userDestination() throws Exception {
TestRepository<Repo> repo = createProject("repo");
insert(repo, newChange(repo));
assertThatQueryException("destination:foo")
.hasMessageThat()
.isEqualTo("Unknown named destination: foo");
}
@Test
public void userQuery() throws Exception {
TestRepository<Repo> repo = createProject("repo");
insert(repo, newChange(repo));
assertThatQueryException("query:foo").hasMessageThat().isEqualTo("Unknown named query: foo");
}
protected ChangeInserter newChange(TestRepository<Repo> repo) throws Exception {
return newChange(repo, null, null, null, null, false);
}