]> source.dussan.org Git - archiva.git/commitdiff
don't write datas in src directories
authorOlivier Lamy <olamy@apache.org>
Thu, 19 Jan 2012 14:23:53 +0000 (14:23 +0000)
committerOlivier Lamy <olamy@apache.org>
Thu, 19 Jan 2012 14:23:53 +0000 (14:23 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1233391 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/DownloadMergedIndexTest.java

index 0de67cedcd260837bd3d3a30ad94829913879eac..2210ef8e7353f33493576a427b8af292aa085bad 100644 (file)
@@ -31,9 +31,7 @@ import org.apache.archiva.rest.api.services.RepositoryGroupService;
 import org.apache.archiva.rest.api.services.SearchService;
 import org.codehaus.redback.integration.security.role.RedbackRoleConstants;
 import org.codehaus.redback.rest.services.FakeCreateAdminService;
-import org.junit.After;
 import org.junit.AfterClass;
-import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -77,7 +75,7 @@ public class DownloadMergedIndexTest
         managedRepository.setId( id );
         managedRepository.setName( "name of " + id );
         managedRepository.setLocation( "src/test/repositories/test-repo" );
-        managedRepository.setIndexDirectory( "target/tmpIndex/" + id );
+        managedRepository.setIndexDirectory( System.getProperty( "java.io.tmpdir" ) + "/target/tmpIndex/" + id );
 
         ManagedRepositoriesService managedRepositoriesService = getManagedRepositoriesService();
 
@@ -114,7 +112,7 @@ public class DownloadMergedIndexTest
         managedRepository.setId( id );
         managedRepository.setName( "name of " + id );
         managedRepository.setLocation( "src/test/repositories/test-repo" );
-        managedRepository.setIndexDirectory( "target/tmpIndex/" + id );
+        managedRepository.setIndexDirectory( System.getProperty( "java.io.tmpdir" ) + "/target/tmpIndex/" + id );
 
         if ( managedRepositoriesService.getManagedRepository( id ) != null )
         {
@@ -153,10 +151,10 @@ public class DownloadMergedIndexTest
 
         SearchService searchService = getSearchService();
 
-        SearchRequest request = new SearchRequest(  );
+        SearchRequest request = new SearchRequest();
         request.setRepositories( Arrays.asList( id ) );
         request.setGroupId( "org.apache.felix" );
-        
+
         List<Artifact> artifacts = searchService.searchArtifacts( request );
         assertFalse( artifacts.isEmpty() );
         assertEquals( 1, artifacts.size() );