Merge "Prevent pushing of patch sets onto invisible patch sets"

This commit is contained in:
Edwin Kempin
2016-06-23 13:30:52 +00:00
committed by Gerrit Code Review
4 changed files with 125 additions and 36 deletions

View File

@@ -520,10 +520,16 @@ public abstract class AbstractDaemonTest {
protected PushOneCommit.Result amendChange(String changeId, String ref)
throws Exception {
return amendChange(changeId, ref, admin, testRepo);
}
protected PushOneCommit.Result amendChange(String changeId, String ref,
TestAccount testAccount, TestRepository<?> repo) throws Exception {
Collections.shuffle(RANDOM);
PushOneCommit push =
pushFactory.create(db, admin.getIdent(), testRepo, PushOneCommit.SUBJECT,
PushOneCommit.FILE_NAME, new String(Chars.toArray(RANDOM)), changeId);
pushFactory.create(db, testAccount.getIdent(), repo,
PushOneCommit.SUBJECT, PushOneCommit.FILE_NAME,
new String(Chars.toArray(RANDOM)), changeId);
return push.to(ref);
}