summaryrefslogtreecommitdiffstats
path: root/src/test/java/com/gitblit/tests/JGitUtilsTest.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2013-09-30 16:22:15 -0400
committerJames Moger <james.moger@gitblit.com>2013-09-30 16:22:15 -0400
commitc00577e5ddded5e53c9074da7def30bd9c350a1e (patch)
treed8786c719807c30104b727516e0d33d41b485674 /src/test/java/com/gitblit/tests/JGitUtilsTest.java
parent699e71e76b15081baf746c6ce9c9144f7e5f1ff9 (diff)
downloadgitblit-c00577e5ddded5e53c9074da7def30bd9c350a1e.tar.gz
gitblit-c00577e5ddded5e53c9074da7def30bd9c350a1e.zip
Remove trailing whitespace from unit tests
Change-Id: I172bd4d493eee1013ec542ab97f1be29040f816d
Diffstat (limited to 'src/test/java/com/gitblit/tests/JGitUtilsTest.java')
-rw-r--r--src/test/java/com/gitblit/tests/JGitUtilsTest.java30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/test/java/com/gitblit/tests/JGitUtilsTest.java b/src/test/java/com/gitblit/tests/JGitUtilsTest.java
index 06fd674a..9f7cb31e 100644
--- a/src/test/java/com/gitblit/tests/JGitUtilsTest.java
+++ b/src/test/java/com/gitblit/tests/JGitUtilsTest.java
@@ -228,7 +228,7 @@ public class JGitUtilsTest {
String repositoryAll = "NewTestRepositoryAll.git";
String repositoryUmask = "NewTestRepositoryUmask.git";
String sgidParent = "sgid";
-
+
File parent = new File(GitBlitSuite.REPOSITORIES, sgidParent);
File folder = null;
boolean parentExisted = parent.exists();
@@ -243,21 +243,21 @@ public class JGitUtilsTest {
Repository repository = JGitUtils.createRepository(parent, repositoryAll, "all");
folder = FileKey.resolve(new File(parent, repositoryAll), FS.DETECTED);
assertNotNull(repository);
-
+
assertEquals("2", repository.getConfig().getString("core", null, "sharedRepository"));
-
+
assertTrue(folder.exists());
mode = JnaUtils.getFilemode(folder);
assertEquals(JnaUtils.S_ISGID, mode & JnaUtils.S_ISGID);
-
+
mode = JnaUtils.getFilemode(folder.getAbsolutePath() + "/HEAD");
assertEquals(JnaUtils.S_IRGRP | JnaUtils.S_IWGRP, mode & JnaUtils.S_IRWXG);
assertEquals(JnaUtils.S_IROTH, mode & JnaUtils.S_IRWXO);
-
+
mode = JnaUtils.getFilemode(folder.getAbsolutePath() + "/config");
assertEquals(JnaUtils.S_IRGRP | JnaUtils.S_IWGRP, mode & JnaUtils.S_IRWXG);
assertEquals(JnaUtils.S_IROTH, mode & JnaUtils.S_IRWXO);
-
+
repository.close();
RepositoryCache.close(repository);
@@ -266,13 +266,13 @@ public class JGitUtilsTest {
repository = JGitUtils.createRepository(parent, repositoryUmask, "umask");
folder = FileKey.resolve(new File(parent, repositoryUmask), FS.DETECTED);
assertNotNull(repository);
-
+
assertEquals(null, repository.getConfig().getString("core", null, "sharedRepository"));
-
+
assertTrue(folder.exists());
mode = JnaUtils.getFilemode(folder);
assertEquals(JnaUtils.S_ISGID, mode & JnaUtils.S_ISGID);
-
+
repository.close();
RepositoryCache.close(repository);
}
@@ -372,7 +372,7 @@ public class JGitUtilsTest {
assertEquals("183474d554e6f68478a02d9d7888b67a9338cdff", list.get(0).notesRef
.getReferencedObjectId().getName());
}
-
+
@Test
public void testRelinkHEAD() throws Exception {
Repository repository = GitBlitSuite.getJGitRepository();
@@ -381,7 +381,7 @@ public class JGitUtilsTest {
assertEquals("refs/heads/master", currentRef);
List<String> availableHeads = JGitUtils.getAvailableHeadTargets(repository);
assertTrue(availableHeads.size() > 0);
-
+
// set HEAD to stable-1.2
JGitUtils.setHEADtoRef(repository, "refs/heads/stable-1.2");
currentRef = JGitUtils.getHEADRef(repository);
@@ -391,19 +391,19 @@ public class JGitUtilsTest {
JGitUtils.setHEADtoRef(repository, "refs/heads/master");
currentRef = JGitUtils.getHEADRef(repository);
assertEquals("refs/heads/master", currentRef);
-
+
repository.close();
}
@Test
public void testRelinkBranch() throws Exception {
Repository repository = GitBlitSuite.getJGitRepository();
-
+
// create/set the branch
JGitUtils.setBranchRef(repository, "refs/heads/reftest", "3b358ce514ec655d3ff67de1430994d8428cdb04");
assertEquals(1, JGitUtils.getAllRefs(repository).get(ObjectId.fromString("3b358ce514ec655d3ff67de1430994d8428cdb04")).size());
assertEquals(null, JGitUtils.getAllRefs(repository).get(ObjectId.fromString("755dfdb40948f5c1ec79e06bde3b0a78c352f27f")));
-
+
// reset the branch
JGitUtils.setBranchRef(repository, "refs/heads/reftest", "755dfdb40948f5c1ec79e06bde3b0a78c352f27f");
assertEquals(null, JGitUtils.getAllRefs(repository).get(ObjectId.fromString("3b358ce514ec655d3ff67de1430994d8428cdb04")));
@@ -606,7 +606,7 @@ public class JGitUtilsTest {
assertTrue(zipFileB.length() > 0);
zipFileB.delete();
}
-
+
@Test
public void testPlots() throws Exception {
Repository repository = GitBlitSuite.getTicgitRepository();