diff options
author | James Moger <james.moger@gitblit.com> | 2013-07-02 14:54:12 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2013-07-02 14:54:25 -0400 |
commit | 06fa4ba6d194446de377629f058c3b7528478520 (patch) | |
tree | 4b1d99cb07d82c8f2620cbc2fe0eb270e219a19f /src/test/java/com | |
parent | 26c887ea966b164a5f9cecc2e6a8b4f1ff2bd9b0 (diff) | |
download | gitblit-06fa4ba6d194446de377629f058c3b7528478520.tar.gz gitblit-06fa4ba6d194446de377629f058c3b7528478520.zip |
Updated test suite to use relocated test config files
Diffstat (limited to 'src/test/java/com')
-rw-r--r-- | src/test/java/com/gitblit/tests/FileUtilsTest.java | 2 | ||||
-rw-r--r-- | src/test/java/com/gitblit/tests/GitBlitSuite.java | 6 | ||||
-rw-r--r-- | src/test/java/com/gitblit/tests/GitBlitTest.java | 4 |
3 files changed, 8 insertions, 4 deletions
diff --git a/src/test/java/com/gitblit/tests/FileUtilsTest.java b/src/test/java/com/gitblit/tests/FileUtilsTest.java index 8e5cf8a6..26f81d52 100644 --- a/src/test/java/com/gitblit/tests/FileUtilsTest.java +++ b/src/test/java/com/gitblit/tests/FileUtilsTest.java @@ -47,7 +47,7 @@ public class FileUtilsTest { assertEquals(-1, FileUtils.folderSize(null));
assertEquals(-1, FileUtils.folderSize(new File(System.getProperty("user.dir"), "pretend")));
- File dir = new File(System.getProperty("user.dir"), "distrib");
+ File dir = new File(System.getProperty("user.dir"), "src/main/distrib");
long size = FileUtils.folderSize(dir);
assertTrue("size is actually " + size, size >= 470000L);
diff --git a/src/test/java/com/gitblit/tests/GitBlitSuite.java b/src/test/java/com/gitblit/tests/GitBlitSuite.java index 82552ec1..d5e37075 100644 --- a/src/test/java/com/gitblit/tests/GitBlitSuite.java +++ b/src/test/java/com/gitblit/tests/GitBlitSuite.java @@ -64,6 +64,10 @@ import com.gitblit.utils.JGitUtils; public class GitBlitSuite {
public static final File REPOSITORIES = new File("data/git");
+
+ public static final File SETTINGS = new File("src/test/config/test-gitblit.properties");
+
+ public static final File USERSCONF = new File("src/test/config/test-users.conf");
static int port = 8280;
static int gitPort = 8300;
@@ -126,7 +130,7 @@ public class GitBlitSuite { GitBlitServer.main("--httpPort", "" + port, "--httpsPort", "0", "--shutdownPort",
"" + shutdownPort, "--gitPort", "" + gitPort, "--repositoriesFolder",
"\"" + GitBlitSuite.REPOSITORIES.getAbsolutePath() + "\"", "--userService",
- "test-users.conf", "--settings", "test-gitblit.properties",
+ GitBlitSuite.USERSCONF.getAbsolutePath(), "--settings", GitBlitSuite.SETTINGS.getAbsolutePath(),
"--baseFolder", "data");
}
});
diff --git a/src/test/java/com/gitblit/tests/GitBlitTest.java b/src/test/java/com/gitblit/tests/GitBlitTest.java index 786614f8..ab23f4eb 100644 --- a/src/test/java/com/gitblit/tests/GitBlitTest.java +++ b/src/test/java/com/gitblit/tests/GitBlitTest.java @@ -131,7 +131,7 @@ public class GitBlitTest { @Test
public void testFileSettings() throws Exception {
- FileSettings settings = new FileSettings("distrib/gitblit.properties");
+ FileSettings settings = new FileSettings("src/main/distrib/data/gitblit.properties");
assertEquals(true, settings.getBoolean("missing", true));
assertEquals("default", settings.getString("missing", "default"));
assertEquals(10, settings.getInteger("missing", 10));
@@ -160,7 +160,7 @@ public class GitBlitTest { assertEquals(5, GitBlit.getInteger("realm.userService", 5));
assertTrue(GitBlit.getBoolean("git.enableGitServlet", false));
- assertEquals("test-users.conf", GitBlit.getString("realm.userService", null));
+ assertEquals(GitBlitSuite.USERSCONF.getAbsolutePath(), GitBlit.getString("realm.userService", null));
assertEquals(5, GitBlit.getInteger("realm.minPasswordLength", 0));
List<String> mdExtensions = GitBlit.getStrings("web.markdownExtensions");
assertTrue(mdExtensions.size() > 0);
|