aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrett Porter <brett@apache.org>2011-10-01 06:23:32 +0000
committerBrett Porter <brett@apache.org>2011-10-01 06:23:32 +0000
commitcf8d566442a2aec3a659ad6e50f205e1acdf29e9 (patch)
tree285410a26c61ea93c6d7f4fde85198803e826f4d
parent77e42c692f63d3c08e2b58584c659511ed7264fc (diff)
downloadarchiva-cf8d566442a2aec3a659ad6e50f205e1acdf29e9.tar.gz
archiva-cf8d566442a2aec3a659ad6e50f205e1acdf29e9.zip
avoid creating .archiva directory in src directory
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1177930 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/SearchServiceTest.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/SearchServiceTest.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/SearchServiceTest.java
index 584e9133e..635b171bb 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/SearchServiceTest.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/SearchServiceTest.java
@@ -23,6 +23,7 @@ import org.apache.archiva.rest.api.model.Artifact;
import org.apache.archiva.rest.api.model.SearchRequest;
import org.apache.archiva.rest.api.services.ManagedRepositoriesService;
import org.apache.archiva.rest.api.services.SearchService;
+import org.apache.commons.io.FileUtils;
import org.junit.Test;
import java.io.File;
@@ -225,7 +226,13 @@ public class SearchServiceTest
{
getManagedRepositoriesService( authorizationHeader ).deleteManagedRepository( testRepoId, true );
}
- File targetRepo = new File( "src/test/repo-with-osgi" );
+ File targetRepo = new File( "target/test-origin-repo" );
+ if ( targetRepo.exists() )
+ {
+ FileUtils.deleteDirectory( targetRepo );
+ }
+ assertFalse( targetRepo.exists() );
+ FileUtils.copyDirectory( new File( "src/test/repo-with-osgi" ), targetRepo );
ManagedRepository managedRepository = new ManagedRepository();
managedRepository.setId( testRepoId );