Add REST endpoint to get one change message
Change-Id: I816623bc2e610e377280c2f705f3258f56f4e890
This commit is contained in:
@@ -110,9 +110,18 @@ public class ChangeMessagesIT extends AbstractDaemonTest {
|
||||
assertThat(messages1).containsExactlyElementsIn(messages2).inOrder();
|
||||
}
|
||||
|
||||
private int createOneChangeWithMultipleChangeMessagesInHistory() throws Exception {
|
||||
// Creates the following commit history on the meta branch of the test change.
|
||||
@Test
|
||||
public void getOneChangeMessage() throws Exception {
|
||||
int changeNum = createOneChangeWithMultipleChangeMessagesInHistory();
|
||||
List<ChangeMessageInfo> messages = new ArrayList<>(gApi.changes().id(changeNum).get().messages);
|
||||
|
||||
for (ChangeMessageInfo messageInfo : messages) {
|
||||
String id = messageInfo.id;
|
||||
assertThat(gApi.changes().id(changeNum).message(id).get()).isEqualTo(messageInfo);
|
||||
}
|
||||
}
|
||||
|
||||
private int createOneChangeWithMultipleChangeMessagesInHistory() throws Exception {
|
||||
setApiUser(user);
|
||||
// Commit 1: create a change.
|
||||
PushOneCommit.Result result = createChange();
|
||||
|
||||
Reference in New Issue
Block a user