| | |
| | | |
| | | @Test |
| | | public void testGetFilemode() throws IOException { |
| | | if (JnaUtils.isWindows()) { |
| | | try { |
| | | JnaUtils.getFilemode(GitBlitSuite.REPOSITORIES); |
| | | } catch(UnsupportedOperationException e) {} |
| | | } |
| | | else { |
| | | String repositoryName = "NewJnaTestRepository.git"; |
| | | Repository repository = JGitUtils.createRepository(GitBlitSuite.REPOSITORIES, repositoryName); |
| | | File folder = FileKey.resolve(new File(GitBlitSuite.REPOSITORIES, repositoryName), FS.DETECTED); |
| | |
| | | RepositoryCache.close(repository); |
| | | FileUtils.deleteDirectory(repository.getDirectory()); |
| | | } |
| | | } |
| | | |
| | | |
| | | @Test |
| | | public void testSetFilemode() throws IOException { |
| | | if (JnaUtils.isWindows()) { |
| | | try { |
| | | JnaUtils.getFilemode(GitBlitSuite.REPOSITORIES); |
| | | } catch(UnsupportedOperationException e) {} |
| | | } |
| | | else { |
| | | String repositoryName = "NewJnaTestRepository.git"; |
| | | Repository repository = JGitUtils.createRepository(GitBlitSuite.REPOSITORIES, repositoryName); |
| | | File folder = FileKey.resolve(new File(GitBlitSuite.REPOSITORIES, repositoryName), FS.DETECTED); |
| | |
| | | FileUtils.deleteDirectory(repository.getDirectory()); |
| | | } |
| | | } |
| | | } |