mirror of
https://github.com/apache/archiva.git
synced 2025-02-28 21:49:10 +00:00
make repository as a variable to be able to use an other on for testing
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1203363 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
472c7e1ff9
commit
098ffbc90a
@ -52,7 +52,7 @@ public void quickSearchOnArtifactId()
|
||||
assertNotNull( getUserService( authorizationHeader ).createGuestUser() );
|
||||
}
|
||||
|
||||
createAndIndexRepo( testRepoId );
|
||||
createAndIndexRepo( testRepoId, "src/test/repo-with-osgi" );
|
||||
|
||||
SearchService searchService = getSearchService( authorizationHeader );
|
||||
|
||||
@ -82,7 +82,7 @@ public void searchArtifactVersions()
|
||||
assertNotNull( getUserService( authorizationHeader ).createGuestUser() );
|
||||
}
|
||||
|
||||
createAndIndexRepo( testRepoId );
|
||||
createAndIndexRepo( testRepoId, "src/test/repo-with-osgi" );
|
||||
|
||||
// START SNIPPET: searchservice-artifact-versions
|
||||
SearchService searchService = getSearchService( authorizationHeader );
|
||||
@ -111,7 +111,7 @@ public void searchWithSearchRequestGroupIdAndArtifactIdAndClassifier()
|
||||
assertNotNull( getUserService( authorizationHeader ).createGuestUser() );
|
||||
}
|
||||
|
||||
createAndIndexRepo( testRepoId );
|
||||
createAndIndexRepo( testRepoId, "src/test/repo-with-osgi" );
|
||||
|
||||
SearchService searchService = getSearchService( authorizationHeader );
|
||||
|
||||
@ -144,7 +144,7 @@ public void searchWithSearchRequestBundleSymbolicNameOneVersion()
|
||||
assertNotNull( getUserService( authorizationHeader ).createGuestUser() );
|
||||
}
|
||||
|
||||
createAndIndexRepo( testRepoId );
|
||||
createAndIndexRepo( testRepoId, "src/test/repo-with-osgi" );
|
||||
|
||||
SearchService searchService = getSearchService( authorizationHeader );
|
||||
|
||||
@ -175,7 +175,7 @@ public void searchWithSearchRequestBundleSymbolicNameTwoVersion()
|
||||
assertNotNull( getUserService( authorizationHeader ).createGuestUser() );
|
||||
}
|
||||
|
||||
createAndIndexRepo( testRepoId );
|
||||
createAndIndexRepo( testRepoId, "src/test/repo-with-osgi" );
|
||||
|
||||
SearchService searchService = getSearchService( authorizationHeader );
|
||||
|
||||
@ -204,7 +204,7 @@ public void searchWithSearchRequestExportPackageOneVersion()
|
||||
assertNotNull( getUserService( authorizationHeader ).createGuestUser() );
|
||||
}
|
||||
|
||||
createAndIndexRepo( testRepoId );
|
||||
createAndIndexRepo( testRepoId, "src/test/repo-with-osgi" );
|
||||
|
||||
SearchService searchService = getSearchService( authorizationHeader );
|
||||
|
||||
@ -237,7 +237,7 @@ public void searchWithSearchUnknwownRepoId()
|
||||
assertNotNull( getUserService( authorizationHeader ).createGuestUser() );
|
||||
}
|
||||
|
||||
createAndIndexRepo( testRepoId );
|
||||
createAndIndexRepo( testRepoId, "src/test/repo-with-osgi" );
|
||||
|
||||
SearchService searchService = getSearchService( authorizationHeader );
|
||||
|
||||
@ -269,7 +269,7 @@ public void searchWithSearchNoRepos()
|
||||
assertNotNull( getUserService( authorizationHeader ).createGuestUser() );
|
||||
}
|
||||
|
||||
createAndIndexRepo( testRepoId );
|
||||
createAndIndexRepo( testRepoId, "src/test/repo-with-osgi" );
|
||||
|
||||
SearchService searchService = getSearchService( authorizationHeader );
|
||||
|
||||
@ -298,7 +298,7 @@ public void getAllGroupIds()
|
||||
assertNotNull( getUserService( authorizationHeader ).createGuestUser() );
|
||||
}
|
||||
|
||||
createAndIndexRepo( testRepoId );
|
||||
createAndIndexRepo( testRepoId, "src/test/repo-with-osgi" );
|
||||
|
||||
SearchService searchService = getSearchService( authorizationHeader );
|
||||
|
||||
@ -310,7 +310,7 @@ public void getAllGroupIds()
|
||||
deleteTestRepo( testRepoId );
|
||||
}
|
||||
|
||||
private void createAndIndexRepo( String testRepoId )
|
||||
private void createAndIndexRepo( String testRepoId, String repoPath )
|
||||
throws Exception
|
||||
{
|
||||
if ( getManagedRepositoriesService( authorizationHeader ).getManagedRepository( testRepoId ) != null )
|
||||
@ -329,7 +329,7 @@ private void createAndIndexRepo( String testRepoId )
|
||||
managedRepository.setId( testRepoId );
|
||||
managedRepository.setName( "test repo" );
|
||||
|
||||
managedRepository.setLocation( new File( "src/test/repo-with-osgi" ).getPath() );
|
||||
managedRepository.setLocation( new File( repoPath ).getPath() );
|
||||
managedRepository.setIndexDirectory( "target/.index-" + Long.toString( new Date().getTime() ) );
|
||||
|
||||
ManagedRepositoriesService service = getManagedRepositoriesService( authorizationHeader );
|
||||
|
Loading…
x
Reference in New Issue
Block a user