Reject inline comments on files that do not exist in the patch set
Bug: issue 2583 Change-Id: I8df23393bc2d311c46a29fb82bca2fa7bf20488a Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
@@ -34,6 +34,7 @@ import com.google.gerrit.lifecycle.LifecycleManager;
|
||||
import com.google.gerrit.reviewdb.client.Account;
|
||||
import com.google.gerrit.reviewdb.client.Branch;
|
||||
import com.google.gerrit.reviewdb.client.Change;
|
||||
import com.google.gerrit.reviewdb.client.Patch;
|
||||
import com.google.gerrit.reviewdb.client.Project;
|
||||
import com.google.gerrit.reviewdb.server.ReviewDb;
|
||||
import com.google.gerrit.server.CurrentUser;
|
||||
@@ -721,7 +722,7 @@ public abstract class AbstractQueryChangesTest {
|
||||
comment.line = 1;
|
||||
comment.message = "inline";
|
||||
input.comments = ImmutableMap.<String, List<ReviewInput.Comment>> of(
|
||||
"Foo.java", ImmutableList.<ReviewInput.Comment> of(comment));
|
||||
Patch.COMMIT_MSG, ImmutableList.<ReviewInput.Comment> of(comment));
|
||||
postReview.apply(new RevisionResource(
|
||||
changes.parse(change.getId()), ins.getPatchSet()), input);
|
||||
|
||||
|
@@ -84,7 +84,7 @@ public class RegexPathPredicateTest {
|
||||
|
||||
private static ChangeData change(String... files) throws OrmException {
|
||||
Arrays.sort(files);
|
||||
ChangeData cd = ChangeData.createForTest(new Change.Id(1));
|
||||
ChangeData cd = ChangeData.createForTest(new Change.Id(1), 1);
|
||||
cd.setCurrentFilePaths(Arrays.asList(files));
|
||||
return cd;
|
||||
}
|
||||
|
Reference in New Issue
Block a user