Merge changes Icf50c0be,I90bcd7d4

* changes:
  Ensure that system groups can be retrieved from the index during tests
  Correct group lookup by name from the index
This commit is contained in:
David Pursehouse
2017-08-24 00:33:58 +00:00
committed by Gerrit Code Review
4 changed files with 23 additions and 4 deletions

View File

@@ -37,8 +37,7 @@ public class GroupPredicates {
}
public static Predicate<AccountGroup> name(String name) {
return new GroupPredicate(
GroupField.NAME, GroupQueryBuilder.FIELD_NAME, name.toLowerCase(Locale.US));
return new GroupPredicate(GroupField.NAME, GroupQueryBuilder.FIELD_NAME, name);
}
public static Predicate<AccountGroup> owner(AccountGroup.UUID ownerUuid) {

View File

@@ -185,9 +185,9 @@ public abstract class AbstractQueryGroupsTest extends GerritServerTests {
public void byName() throws Exception {
assertQuery("name:non-existing");
GroupInfo group = createGroup(name("group"));
GroupInfo group = createGroup(name("Group"));
assertQuery("name:" + group.name, group);
assertQuery("name:" + group.name.toUpperCase(Locale.US), group);
assertQuery("name:" + group.name.toLowerCase(Locale.US));
// only exact match
GroupInfo groupWithHyphen = createGroup(name("group-with-hyphen"));