mirror of https://github.com/apache/archiva.git
improve unit test with testing packed index files are really created
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1384208 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
42b0dd3f92
commit
46b69ff5f0
|
@ -273,6 +273,7 @@ public class ArchivaIndexingTaskExecutorTest
|
||||||
public void testPackagedIndex()
|
public void testPackagedIndex()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
|
|
||||||
File artifactFile = new File( repositoryConfig.getLocation(),
|
File artifactFile = new File( repositoryConfig.getLocation(),
|
||||||
"org/apache/archiva/archiva-index-methods-jar-test/1.0/archiva-index-methods-jar-test-1.0.jar" );
|
"org/apache/archiva/archiva-index-methods-jar-test/1.0/archiva-index-methods-jar-test-1.0.jar" );
|
||||||
|
|
||||||
|
@ -292,9 +293,16 @@ public class ArchivaIndexingTaskExecutorTest
|
||||||
|
|
||||||
assertTrue( new File( repositoryConfig.getLocation(), ".indexer" ).exists() );
|
assertTrue( new File( repositoryConfig.getLocation(), ".indexer" ).exists() );
|
||||||
|
|
||||||
|
File indexerDirectory = new File( repositoryConfig.getLocation(), ".indexer" );
|
||||||
|
|
||||||
|
// test packed index file creation
|
||||||
|
assertTrue( new File( indexerDirectory, "nexus-maven-repository-index.zip" ).exists() );
|
||||||
|
assertTrue( new File( indexerDirectory, "nexus-maven-repository-index.properties" ).exists() );
|
||||||
|
assertTrue( new File( indexerDirectory, "nexus-maven-repository-index.gz" ).exists() );
|
||||||
|
|
||||||
// unpack .zip index
|
// unpack .zip index
|
||||||
File destDir = new File( repositoryConfig.getLocation(), ".indexer/tmp" );
|
File destDir = new File( repositoryConfig.getLocation(), ".indexer/tmp" );
|
||||||
unzipIndex( new File( repositoryConfig.getLocation(), ".indexer" ).getPath(), destDir.getPath() );
|
unzipIndex( indexerDirectory.getPath(), destDir.getPath() );
|
||||||
|
|
||||||
BooleanQuery q = new BooleanQuery();
|
BooleanQuery q = new BooleanQuery();
|
||||||
q.add( indexer.constructQuery( MAVEN.GROUP_ID, new StringSearchExpression( "org.apache.archiva" ) ),
|
q.add( indexer.constructQuery( MAVEN.GROUP_ID, new StringSearchExpression( "org.apache.archiva" ) ),
|
||||||
|
|
Loading…
Reference in New Issue