summaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-scheduler
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2012-09-13 05:39:29 +0000
committerOlivier Lamy <olamy@apache.org>2012-09-13 05:39:29 +0000
commit46b69ff5f0a671307b3f902d7fd3481ee61c4dc4 (patch)
tree43829de1ef7d840a91e2a2c4b761b69629e7c703 /archiva-modules/archiva-scheduler
parent42b0dd3f9224835e07ab6cbb4646893bbbcdbcad (diff)
downloadarchiva-46b69ff5f0a671307b3f902d7fd3481ee61c4dc4.tar.gz
archiva-46b69ff5f0a671307b3f902d7fd3481ee61c4dc4.zip
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
Diffstat (limited to 'archiva-modules/archiva-scheduler')
-rw-r--r--archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/java/org/apache/archiva/scheduler/indexing/ArchivaIndexingTaskExecutorTest.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/java/org/apache/archiva/scheduler/indexing/ArchivaIndexingTaskExecutorTest.java b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/java/org/apache/archiva/scheduler/indexing/ArchivaIndexingTaskExecutorTest.java
index 60c9e1a65..e517b3059 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/java/org/apache/archiva/scheduler/indexing/ArchivaIndexingTaskExecutorTest.java
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/java/org/apache/archiva/scheduler/indexing/ArchivaIndexingTaskExecutorTest.java
@@ -273,6 +273,7 @@ public class ArchivaIndexingTaskExecutorTest
public void testPackagedIndex()
throws Exception
{
+
File artifactFile = new File( repositoryConfig.getLocation(),
"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() );
+ 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
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();
q.add( indexer.constructQuery( MAVEN.GROUP_ID, new StringSearchExpression( "org.apache.archiva" ) ),