Search in sources :

Example 21 with IndexGitRepoJob

use of com.searchcode.app.jobs.repository.IndexGitRepoJob in project searchcode-server by boyter.

the class IndexBaseRepoJobTest method testGetCodeLinesLogIndexedInvalid.

public void testGetCodeLinesLogIndexedInvalid() {
    IndexGitRepoJob indexGitRepoJob = new IndexGitRepoJob();
    indexGitRepoJob.LOGINDEXED = true;
    List<String[]> reportList = new ArrayList<>();
    IndexBaseRepoJob.CodeLinesReturn codeLines = indexGitRepoJob.getCodeLines("", reportList);
    assertThat(codeLines.isError()).isTrue();
    assertThat(codeLines.getReportList().get(0)[1]).isEqualTo("excluded");
    assertThat(codeLines.getReportList().get(0)[2]).isEqualTo("unable to guess guess file encoding");
}
Also used : IndexBaseRepoJob(com.searchcode.app.jobs.repository.IndexBaseRepoJob) ArrayList(java.util.ArrayList) IndexGitRepoJob(com.searchcode.app.jobs.repository.IndexGitRepoJob)

Aggregations

IndexGitRepoJob (com.searchcode.app.jobs.repository.IndexGitRepoJob)21 ArrayList (java.util.ArrayList)5 CodeSearcher (com.searchcode.app.service.CodeSearcher)4 File (java.io.File)4 RepositoryChanged (com.searchcode.app.dto.RepositoryChanged)3 IndexBaseRepoJob (com.searchcode.app.jobs.repository.IndexBaseRepoJob)3 SearchResult (com.searchcode.app.dto.SearchResult)2 UniqueRepoQueue (com.searchcode.app.util.UniqueRepoQueue)2 Path (java.nio.file.Path)2 TestHelpers (com.searchcode.app.TestHelpers)1 Values (com.searchcode.app.config.Values)1 CodeResult (com.searchcode.app.dto.CodeResult)1 IndexFileRepoJob (com.searchcode.app.jobs.repository.IndexFileRepoJob)1 IndexSvnRepoJob (com.searchcode.app.jobs.repository.IndexSvnRepoJob)1 RepoResult (com.searchcode.app.model.RepoResult)1 CodeIndexer (com.searchcode.app.service.CodeIndexer)1 SharedService (com.searchcode.app.service.SharedService)1 Singleton (com.searchcode.app.service.Singleton)1 StatsService (com.searchcode.app.service.StatsService)1 Properties (com.searchcode.app.util.Properties)1