diff options
author | James Moger <james.moger@gitblit.com> | 2014-10-13 19:08:30 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-10-13 19:19:37 -0400 |
commit | 18c6ba413110bbf74023bf82662c89118f93606b (patch) | |
tree | bfb7ad609cc84f03972174004d1594ccf2e60e71 /src | |
parent | 4cdc034f4d7e00f779b649988fa7914ab1cb4acc (diff) | |
download | gitblit-18c6ba413110bbf74023bf82662c89118f93606b.tar.gz gitblit-18c6ba413110bbf74023bf82662c89118f93606b.zip |
Fix GitBlitTest.testGitblitSettings()
Diffstat (limited to 'src')
-rw-r--r-- | src/test/java/com/gitblit/tests/GitBlitTest.java | 6 |
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);
|