Merge branch 'stable-2.12' into stable-2.13
* stable-2.12: Fix broken submit tests Add @Sandboxed annotation for classes and methods Add tests for submit whole topic on multiple projects/branches Update download-commands plugin It seems no longer necessary to run the submit tests sandboxed, so remove that annotation. Change-Id: I442ed6efc045bff51259b8d08915b8a1cc1e2eb0
This commit is contained in:
@@ -29,6 +29,7 @@ import com.google.common.collect.Iterables;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.google.common.primitives.Chars;
|
||||
import com.google.gerrit.acceptance.AcceptanceTestRequestScope.Context;
|
||||
import com.google.gerrit.common.Nullable;
|
||||
import com.google.gerrit.common.data.AccessSection;
|
||||
import com.google.gerrit.common.data.Permission;
|
||||
import com.google.gerrit.common.data.PermissionRule;
|
||||
@@ -322,7 +323,8 @@ public abstract class AbstractDaemonTest {
|
||||
baseConfig.setString("gerrit", null, "tempSiteDir",
|
||||
tempSiteDir.getRoot().getPath());
|
||||
baseConfig.setInt("receive", null, "changeUpdateThreads", 4);
|
||||
if (classDesc.equals(methodDesc)) {
|
||||
if (classDesc.equals(methodDesc) && !classDesc.sandboxed() &&
|
||||
!methodDesc.sandboxed()) {
|
||||
if (commonServer == null) {
|
||||
commonServer = GerritServer.start(classDesc, baseConfig);
|
||||
}
|
||||
@@ -940,4 +942,13 @@ public abstract class AbstractDaemonTest {
|
||||
(EmailHeader.String)message.headers().get("Reply-To");
|
||||
assertThat(replyTo.getString()).isEqualTo(email);
|
||||
}
|
||||
|
||||
protected TestRepository<?> createProjectWithPush(String name,
|
||||
@Nullable Project.NameKey parent,
|
||||
SubmitType submitType) throws Exception {
|
||||
Project.NameKey project = createProject(name, parent, true, submitType);
|
||||
grant(Permission.PUSH, project, "refs/heads/*");
|
||||
grant(Permission.SUBMIT, project, "refs/for/refs/heads/*");
|
||||
return cloneProject(project);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user