Merge changes from topic 'fix-broken-tests'
* changes: Submit: Set correct patch set on approval when submitting new patch set Fix broken SubmitByCherryPickIT
This commit is contained in:
@@ -163,8 +163,13 @@ public abstract class AbstractSubmit extends AbstractDaemonTest {
|
||||
ChangeInfo info = get(change.getChangeId(), ListChangesOption.MESSAGES);
|
||||
assertThat((Iterable<?>)info.messages).isNotNull();
|
||||
assertThat((Iterable<?>)info.messages).hasSize(3);
|
||||
assertThat(Iterables.getLast(info.messages).message).isEqualTo(
|
||||
"Change has been successfully merged into the git repository by Administrator");
|
||||
if (getSubmitType() == SubmitType.CHERRY_PICK) {
|
||||
assertThat(Iterables.getLast(info.messages).message).startsWith(
|
||||
"Change has been successfully cherry-picked as ");
|
||||
} else {
|
||||
assertThat(Iterables.getLast(info.messages).message).isEqualTo(
|
||||
"Change has been successfully merged into the git repository by Administrator");
|
||||
}
|
||||
}
|
||||
|
||||
protected Git createProject() throws JSchException, IOException,
|
||||
|
@@ -385,7 +385,7 @@ public class Submit implements RestModifyView<RevisionResource, SubmitInput>,
|
||||
|
||||
db.changes().beginTransaction(change.getId());
|
||||
try {
|
||||
BatchMetaDataUpdate batch = approve(change.currentPatchSetId(),
|
||||
BatchMetaDataUpdate batch = approve(rsrc.getPatchSet().getId(),
|
||||
cd.changeControl(), update, caller, timestamp);
|
||||
// Write update commit after all normalized label commits.
|
||||
batch.write(update, new CommitBuilder());
|
||||
|
Reference in New Issue
Block a user