James Moger
2012-10-23 1c817663269b52065b79eba37f29a5a4f67348d1
Fix broken unit test on Windows
1 files modified
4 ■■■■ changed files
tests/com/gitblit/tests/GitServletTest.java 4 ●●●● patch | view | raw | blame | history
tests/com/gitblit/tests/GitServletTest.java
@@ -611,11 +611,13 @@
        }
        
        File personalRepo = new File(GitBlitSuite.REPOSITORIES, MessageFormat.format("~{0}/ticgit.git", user.username));
        GitBlitSuite.close(personalRepo);
        if (personalRepo.exists()) {
            FileUtils.delete(personalRepo, FileUtils.RECURSIVE);
        }
        File projectRepo = new File(GitBlitSuite.REPOSITORIES, "project/ticgit.git");
        GitBlitSuite.close(projectRepo);
        if (projectRepo.exists()) {
            FileUtils.delete(projectRepo, FileUtils.RECURSIVE);
        }
@@ -628,6 +630,8 @@
        clone.setCredentialsProvider(cp);
        Git git = clone.call();
        
        GitBlitSuite.close(personalRepo);
        // add a personal repository remote and a project remote
        git.getRepository().getConfig().setString("remote", "user", "url", MessageFormat.format("{0}/git/~{1}/ticgit.git", url, user.username));
        git.getRepository().getConfig().setString("remote", "project", "url", MessageFormat.format("{0}/git/project/ticgit.git", url));