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,9 +163,14 @@ public abstract class AbstractSubmit extends AbstractDaemonTest {
|
|||||||
ChangeInfo info = get(change.getChangeId(), ListChangesOption.MESSAGES);
|
ChangeInfo info = get(change.getChangeId(), ListChangesOption.MESSAGES);
|
||||||
assertThat((Iterable<?>)info.messages).isNotNull();
|
assertThat((Iterable<?>)info.messages).isNotNull();
|
||||||
assertThat((Iterable<?>)info.messages).hasSize(3);
|
assertThat((Iterable<?>)info.messages).hasSize(3);
|
||||||
|
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(
|
assertThat(Iterables.getLast(info.messages).message).isEqualTo(
|
||||||
"Change has been successfully merged into the git repository by Administrator");
|
"Change has been successfully merged into the git repository by Administrator");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected Git createProject() throws JSchException, IOException,
|
protected Git createProject() throws JSchException, IOException,
|
||||||
GitAPIException {
|
GitAPIException {
|
||||||
|
@@ -385,7 +385,7 @@ public class Submit implements RestModifyView<RevisionResource, SubmitInput>,
|
|||||||
|
|
||||||
db.changes().beginTransaction(change.getId());
|
db.changes().beginTransaction(change.getId());
|
||||||
try {
|
try {
|
||||||
BatchMetaDataUpdate batch = approve(change.currentPatchSetId(),
|
BatchMetaDataUpdate batch = approve(rsrc.getPatchSet().getId(),
|
||||||
cd.changeControl(), update, caller, timestamp);
|
cd.changeControl(), update, caller, timestamp);
|
||||||
// Write update commit after all normalized label commits.
|
// Write update commit after all normalized label commits.
|
||||||
batch.write(update, new CommitBuilder());
|
batch.write(update, new CommitBuilder());
|
||||||
|
Reference in New Issue
Block a user