mirror of https://github.com/apache/archiva.git
fix issues downloading merged index path (thanks to unit tests) and add an other with non default mergedindex path
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1470481 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cd7372298d
commit
97f22cd13c
|
@ -123,8 +123,15 @@ public class DownloadMergedIndexTest
|
|||
|
||||
RepositoryGroupService repositoryGroupService = getRepositoryGroupService();
|
||||
|
||||
String repoGroupId = "test-group";
|
||||
|
||||
if ( repositoryGroupService.getRepositoryGroup( repoGroupId ) != null )
|
||||
{
|
||||
repositoryGroupService.deleteRepositoryGroup( repoGroupId );
|
||||
}
|
||||
|
||||
RepositoryGroup repositoryGroup = new RepositoryGroup();
|
||||
repositoryGroup.setId( "test-group" );
|
||||
repositoryGroup.setId( repoGroupId );
|
||||
repositoryGroup.setRepositories( Arrays.asList( id ) );
|
||||
|
||||
repositoryGroupService.addRepositoryGroup( repositoryGroup );
|
||||
|
@ -134,7 +141,7 @@ public class DownloadMergedIndexTest
|
|||
managedRepository = new ManagedRepository();
|
||||
managedRepository.setId( id );
|
||||
managedRepository.setName( "name of " + id );
|
||||
managedRepository.setLocation(System.getProperty( "basedir" ) + "/src/test/repositories/test-repo" );
|
||||
managedRepository.setLocation( System.getProperty( "basedir" ) + "/src/test/repositories/test-repo" );
|
||||
managedRepository.setIndexDirectory( System.getProperty( "java.io.tmpdir" ) + "/tmpIndex/" + id );
|
||||
|
||||
if ( managedRepositoriesService.getManagedRepository( id ) != null )
|
||||
|
@ -157,7 +164,7 @@ public class DownloadMergedIndexTest
|
|||
|
||||
ProxyConnectorService proxyConnectorService = getProxyConnectorService();
|
||||
ProxyConnector proxyConnector = new ProxyConnector();
|
||||
proxyConnector.setProxyId( "foo-bar" );
|
||||
proxyConnector.setProxyId( "foo-bar1" );
|
||||
proxyConnector.setSourceRepoId( id );
|
||||
proxyConnector.setTargetRepoId( "all-merged" );
|
||||
proxyConnectorService.addProxyConnector( proxyConnector );
|
||||
|
|
|
@ -446,7 +446,7 @@ public class ArchivaDavResourceFactory
|
|||
|
||||
String rootPath = StringUtils.substringBeforeLast( pathInfo, "/" );
|
||||
|
||||
if ( StringUtils.endsWith( rootPath, "/" + repoGroupConfig.getMergedIndexPath() ) )
|
||||
if ( StringUtils.endsWith( rootPath, repoGroupConfig.getMergedIndexPath() ) )
|
||||
{
|
||||
// we are in the case of index file request
|
||||
String requestedFileName = StringUtils.substringAfterLast( pathInfo, "/" );
|
||||
|
|
Loading…
Reference in New Issue