Make integration test methods throw Exception
Managing multiple exception types is not worth the hassle, and many of them have become unused. Change-Id: I83ebd7168dfac666c303571b9b70874be6cde93b
This commit is contained in:
@@ -23,9 +23,7 @@ import com.google.gerrit.acceptance.PushOneCommit;
|
||||
import com.google.gerrit.common.data.Permission;
|
||||
import com.google.gerrit.server.git.MetaDataUpdate;
|
||||
import com.google.gerrit.server.git.ProjectConfig;
|
||||
import com.google.gwtorm.server.OrmException;
|
||||
|
||||
import org.eclipse.jgit.api.errors.GitAPIException;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -43,16 +41,14 @@ public class DraftChangeBlockedIT extends AbstractDaemonTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPushDraftChange_Blocked() throws GitAPIException,
|
||||
OrmException, IOException {
|
||||
public void testPushDraftChange_Blocked() throws Exception {
|
||||
// create draft by pushing to 'refs/drafts/'
|
||||
PushOneCommit.Result r = pushTo("refs/drafts/master");
|
||||
r.assertErrorStatus("cannot upload drafts");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPushDraftChangeMagic_Blocked() throws GitAPIException,
|
||||
OrmException, IOException {
|
||||
public void testPushDraftChangeMagic_Blocked() throws Exception {
|
||||
// create draft by using 'draft' option
|
||||
PushOneCommit.Result r = pushTo("refs/for/master%draft");
|
||||
r.assertErrorStatus("cannot upload drafts");
|
||||
|
||||
Reference in New Issue
Block a user