summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-10-13 19:08:30 -0400
committerJames Moger <james.moger@gitblit.com>2014-10-13 19:08:30 -0400
commitcdb92477597f84f9c45347c803c6d305dea6ff2e (patch)
tree7b1e0687772889d82b7928facd147f67903d009c
parentb236d715383920b7c92c035dcf769114011fa426 (diff)
downloadgitblit-cdb92477597f84f9c45347c803c6d305dea6ff2e.tar.gz
gitblit-cdb92477597f84f9c45347c803c6d305dea6ff2e.zip
Fix GitBlitTest.testGitblitSettings()
-rw-r--r--src/test/java/com/gitblit/tests/GitBlitTest.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/test/java/com/gitblit/tests/GitBlitTest.java b/src/test/java/com/gitblit/tests/GitBlitTest.java
index 1f81b875..9eaae7f8 100644
--- a/src/test/java/com/gitblit/tests/GitBlitTest.java
+++ b/src/test/java/com/gitblit/tests/GitBlitTest.java
@@ -15,6 +15,7 @@
*/
package com.gitblit.tests;
+import java.io.File;
import java.util.List;
import org.eclipse.jgit.lib.Repository;
@@ -24,6 +25,7 @@ import com.gitblit.Constants.AccessRestrictionType;
import com.gitblit.FileSettings;
import com.gitblit.models.RepositoryModel;
import com.gitblit.models.UserModel;
+import com.gitblit.utils.FileUtils;
public class GitBlitTest extends GitblitUnitTest {
@@ -156,7 +158,9 @@ public class GitBlitTest extends GitblitUnitTest {
assertEquals(5, settings().getInteger("realm.userService", 5));
assertTrue(settings().getBoolean("git.enableGitServlet", false));
- assertEquals("src/test/config/test-users.conf", settings().getString("realm.userService", null));
+ File userDir = new File(System.getProperty("user.dir"));
+ File userService = new File(settings().getString("realm.userService", null));
+ assertEquals("src/test/config/test-users.conf", FileUtils.getRelativePath(userDir, userService));
assertEquals(5, settings().getInteger("realm.minPasswordLength", 0));
List<String> mdExtensions = settings().getStrings("web.markdownExtensions");
assertTrue(mdExtensions.size() > 0);