summaryrefslogtreecommitdiffstats
path: root/src/test/java/com/gitblit/tests/GitBlitSuite.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/com/gitblit/tests/GitBlitSuite.java')
-rw-r--r--src/test/java/com/gitblit/tests/GitBlitSuite.java25
1 files changed, 16 insertions, 9 deletions
diff --git a/src/test/java/com/gitblit/tests/GitBlitSuite.java b/src/test/java/com/gitblit/tests/GitBlitSuite.java
index 57e94e51..7fc6fe0e 100644
--- a/src/test/java/com/gitblit/tests/GitBlitSuite.java
+++ b/src/test/java/com/gitblit/tests/GitBlitSuite.java
@@ -65,6 +65,8 @@ import com.gitblit.utils.JGitUtils;
ModelUtilsTest.class, JnaUtilsTest.class })
public class GitBlitSuite {
+ public static final File BASEFOLDER = new File("data");
+
public static final File REPOSITORIES = new File("data/git");
public static final File SETTINGS = new File("src/test/config/test-gitblit.properties");
@@ -83,30 +85,35 @@ public class GitBlitSuite {
private static AtomicBoolean started = new AtomicBoolean(false);
- public static Repository getHelloworldRepository() throws Exception {
+ public static Repository getHelloworldRepository() {
return getRepository("helloworld.git");
}
- public static Repository getTicgitRepository() throws Exception {
+ public static Repository getTicgitRepository() {
return getRepository("ticgit.git");
}
- public static Repository getJGitRepository() throws Exception {
+ public static Repository getJGitRepository() {
return getRepository("test/jgit.git");
}
- public static Repository getAmbitionRepository() throws Exception {
+ public static Repository getAmbitionRepository() {
return getRepository("test/ambition.git");
}
- public static Repository getGitectiveRepository() throws Exception {
+ public static Repository getGitectiveRepository() {
return getRepository("test/gitective.git");
}
- private static Repository getRepository(String name) throws Exception {
- File gitDir = FileKey.resolve(new File(REPOSITORIES, name), FS.DETECTED);
- Repository repository = new FileRepositoryBuilder().setGitDir(gitDir).build();
- return repository;
+ private static Repository getRepository(String name) {
+ try {
+ File gitDir = FileKey.resolve(new File(REPOSITORIES, name), FS.DETECTED);
+ Repository repository = new FileRepositoryBuilder().setGitDir(gitDir).build();
+ return repository;
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return null;
}
public static boolean startGitblit() throws Exception {