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:
@@ -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) {
|
||||
|
||||
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user