Skip to content

Commit 049e167

Browse files
committed
improve the test - add untracked file
1 parent a8b8a9b commit 049e167

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

opengrok-indexer/src/test/java/org/opengrok/indexer/history/FileHistoryCacheTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -866,6 +866,11 @@ void testHistoryCacheForEmptyGitRepository() throws Exception {
866866
assertTrue(repositoryRoot.mkdir());
867867
Git.init().setDirectory(repositoryRoot).call();
868868

869+
// Create untracked file.
870+
Path untrackedFile = repositoryRoot.toPath().resolve("untrackedFile");
871+
Files.createFile(untrackedFile);
872+
assertTrue(untrackedFile.toFile().exists());
873+
869874
Repository repository = RepositoryFactory.getRepository(repositoryRoot);
870875
assertNotNull(repository);
871876
History history = repository.getHistory(repositoryRoot);

0 commit comments

Comments
 (0)