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:
Dave Borowitz
2014-10-28 12:20:04 -07:00
parent 0b2f24cd04
commit 854232cd07
49 changed files with 181 additions and 362 deletions

View File

@@ -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");