CreateChange: Do not fail with ISE if base commit doesn't exist
Signed-off-by: Edwin Kempin <ekempin@google.com> Change-Id: If2886342815234d385e10d7ba7fe27127229ad4a
This commit is contained in:
@@ -277,6 +277,16 @@ public class CreateChangeIT extends AbstractDaemonTest {
|
||||
input, UnprocessableEntityException.class, "Base notasha1 doesn't represent a valid SHA-1");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void createChangeWithNonExistingParentCommitFails() throws Exception {
|
||||
ChangeInput input = newChangeInput(ChangeStatus.NEW);
|
||||
input.baseCommit = "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef";
|
||||
assertCreateFails(
|
||||
input,
|
||||
UnprocessableEntityException.class,
|
||||
String.format("Base %s doesn't exist", input.baseCommit));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void createChangeWithParentCommitOnWrongBranchFails() throws Exception {
|
||||
Map<String, PushOneCommit.Result> setup =
|
||||
|
||||
Reference in New Issue
Block a user