createAndIndexRepo( testRepoId, repoPath, scan, true );
RepositoriesService repositoriesService = getRepositoriesService( authorizationHeader );
repositoriesService.scanRepositoryDirectoriesNow( testRepoId );
if ( scan )
{
repositoriesService.scanRepositoryNow( testRepoId + "-stage", true );
repositoriesService.scanRepositoryDirectoriesNow( testRepoId + "-stage" );
}
}