mirror of https://github.com/apache/archiva.git
fix unit paths so you can run unit on path with space
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1370597 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3a3f22c39b
commit
fd6b9b7e93
|
@ -143,7 +143,7 @@ public abstract class AbstractRepositoryPurgeTest
|
|||
}
|
||||
}
|
||||
|
||||
private static String fixPath( String path )
|
||||
protected static String fixPath( String path )
|
||||
{
|
||||
if ( path.contains( " " ) )
|
||||
{
|
||||
|
@ -202,15 +202,18 @@ public abstract class AbstractRepositoryPurgeTest
|
|||
throws Exception
|
||||
{
|
||||
removeMavenIndexes();
|
||||
File testDir = getTestRepoRoot();// AbstractRepositoryPurgeTest.fixPath( getTestRepoRoot() );
|
||||
File testDir = new File( AbstractRepositoryPurgeTest.fixPath( getTestRepoRoot().getAbsolutePath() ) ) ;// AbstractRepositoryPurgeTest.fixPath( getTestRepoRoot() );
|
||||
FileUtils.deleteDirectory( testDir );
|
||||
FileUtils.copyDirectory( new File( "target/test-classes/" + TEST_REPO_ID ), testDir );
|
||||
File sourceDir = new File ( new File( "target/test-classes/" + TEST_REPO_ID).getAbsolutePath() );
|
||||
FileUtils.copyDirectory( sourceDir, testDir );
|
||||
|
||||
File releasesTestDir = new File( AbstractRepositoryPurgeTest.fixPath( new File( "target/test-" + getName() + "/" + RELEASES_TEST_REPO_ID ).getAbsolutePath() ) );
|
||||
|
||||
File releasesTestDir = new File( "target/test-" + getName() + "/" + RELEASES_TEST_REPO_ID );
|
||||
FileUtils.deleteDirectory( releasesTestDir );
|
||||
FileUtils.copyDirectory( new File( "target/test-classes/" + RELEASES_TEST_REPO_ID ), releasesTestDir );
|
||||
File sourceReleasesDir = new File ( new File( "target/test-classes/" + RELEASES_TEST_REPO_ID).getAbsolutePath() );
|
||||
FileUtils.copyDirectory( sourceReleasesDir, releasesTestDir );
|
||||
|
||||
return testDir.getAbsolutePath();
|
||||
return AbstractRepositoryPurgeTest.fixPath( testDir.getAbsolutePath() );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -212,8 +212,8 @@ public class CleanupReleasedSnapshotsRepositoryPurgeTest
|
|||
assertDeleted( projectRoot + "/1.0-SNAPSHOT/released-artifact-in-diff-repo-1.0-SNAPSHOT.pom.sha1" );
|
||||
|
||||
String releasesProjectRoot =
|
||||
new File( "target/test-" + getName() + "/releases-test-repo-one" ).getAbsolutePath()
|
||||
+ "/org/apache/archiva/released-artifact-in-diff-repo";
|
||||
AbstractRepositoryPurgeTest.fixPath( new File( "target/test-" + getName() + "/releases-test-repo-one" ).getAbsolutePath()
|
||||
+ "/org/apache/archiva/released-artifact-in-diff-repo" );
|
||||
|
||||
// check if the released version was not removed
|
||||
assertExists( releasesProjectRoot + "/1.0" );
|
||||
|
|
Loading…
Reference in New Issue