Move Util#{ADMIN,DEVS} to RefControlTest

Change-Id: I4e971a8cd283c89ba250c2dfb1a7e2793b4cc13e
This commit is contained in:
Dave Borowitz
2019-05-16 13:58:00 +02:00
parent 9ead157542
commit 9f13a9fd39
2 changed files with 3 additions and 6 deletions

View File

@@ -17,13 +17,9 @@ package com.google.gerrit.server.project.testing;
import com.google.gerrit.common.data.LabelFunction;
import com.google.gerrit.common.data.LabelType;
import com.google.gerrit.common.data.LabelValue;
import com.google.gerrit.reviewdb.client.AccountGroup;
import java.util.Arrays;
public class Util {
public static final AccountGroup.UUID ADMIN = AccountGroup.uuid("test.admin");
public static final AccountGroup.UUID DEVS = AccountGroup.uuid("test.devs");
public static final LabelType codeReview() {
return category(
"Code-Review",

View File

@@ -33,8 +33,6 @@ import static com.google.gerrit.reviewdb.client.RefNames.REFS_CONFIG;
import static com.google.gerrit.server.group.SystemGroupBackend.ANONYMOUS_USERS;
import static com.google.gerrit.server.group.SystemGroupBackend.CHANGE_OWNER;
import static com.google.gerrit.server.group.SystemGroupBackend.REGISTERED_USERS;
import static com.google.gerrit.server.project.testing.Util.ADMIN;
import static com.google.gerrit.server.project.testing.Util.DEVS;
import static com.google.gerrit.testing.GerritJUnit.assertThrows;
import com.google.common.collect.Lists;
@@ -72,6 +70,9 @@ import org.junit.Before;
import org.junit.Test;
public class RefControlTest {
private static final AccountGroup.UUID ADMIN = AccountGroup.uuid("test.admin");
private static final AccountGroup.UUID DEVS = AccountGroup.uuid("test.devs");
private void assertAdminsAreOwnersAndDevsAreNot() throws Exception {
ProjectControl uBlah = user(localKey, DEVS);
ProjectControl uAdmin = user(localKey, DEVS, ADMIN);