From e59d9d987a5dc29dc210feb28f4f347f12db4e5c Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Fri, 18 Sep 2015 08:27:32 -0400
Subject: [PATCH] Update to Wicket 1.4.22
---
src/test/java/com/gitblit/tests/JGitUtilsTest.java | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/src/test/java/com/gitblit/tests/JGitUtilsTest.java b/src/test/java/com/gitblit/tests/JGitUtilsTest.java
index 05bea91..2cf4a5a 100644
--- a/src/test/java/com/gitblit/tests/JGitUtilsTest.java
+++ b/src/test/java/com/gitblit/tests/JGitUtilsTest.java
@@ -420,6 +420,11 @@
String contentA = JGitUtils.getStringContent(repository, (RevTree) null, "java.java");
RevCommit commit = JGitUtils.getCommit(repository, Constants.HEAD);
String contentB = JGitUtils.getStringContent(repository, commit.getTree(), "java.java");
+
+ assertTrue("ContentA is null!", contentA != null && contentA.length() > 0);
+ assertTrue("ContentB is null!", contentB != null && contentB.length() > 0);
+ assertTrue(contentA.equals(contentB));
+
String contentC = JGitUtils.getStringContent(repository, commit.getTree(), "missing.txt");
// manually construct a blob, calculate the hash, lookup the hash in git
@@ -429,9 +434,6 @@
String sha1 = StringUtils.getSHA1(sb.toString());
String contentD = JGitUtils.getStringContent(repository, sha1);
repository.close();
- assertTrue("ContentA is null!", contentA != null && contentA.length() > 0);
- assertTrue("ContentB is null!", contentB != null && contentB.length() > 0);
- assertTrue(contentA.equals(contentB));
assertNull(contentC);
assertTrue(contentA.equals(contentD));
}
@@ -469,6 +471,15 @@
assertEquals(0, JGitUtils.getFilesInPath(null, null, null).size());
Repository repository = GitBlitSuite.getHelloworldRepository();
List<PathModel> files = JGitUtils.getFilesInPath(repository, null, null);
+ repository.close();
+ assertTrue(files.size() > 10);
+ }
+
+ @Test
+ public void testFilesInPath2() throws Exception {
+ assertEquals(0, JGitUtils.getFilesInPath2(null, null, null).size());
+ Repository repository = GitBlitSuite.getHelloworldRepository();
+ List<PathModel> files = JGitUtils.getFilesInPath2(repository, null, null);
repository.close();
assertTrue(files.size() > 10);
}
@@ -518,7 +529,7 @@
// grab the commits since 2008-07-15
commits = JGitUtils.getRevLog(repository, null,
new SimpleDateFormat("yyyy-MM-dd").parse("2008-07-15"));
- assertEquals(19, commits.size());
+ assertEquals(12, commits.size());
repository.close();
}
--
Gitblit v1.9.1