}
public void testReleasedSnapshotsWereCleaned()
throws Exception
{
KnownRepositoryContentConsumer repoPurgeConsumer =
(KnownRepositoryContentConsumer) lookup( KnownRepositoryContentConsumer.class,
"repo-purge-consumer-by-days-old" );
ManagedRepositoryConfiguration repoConfiguration = getRepoConfiguration( TEST_REPO_ID, TEST_REPO_NAME );
repoConfiguration.setDeleteReleasedSnapshots( true );
addRepoToConfiguration( "days-old", repoConfiguration );
repoPurgeConsumer.beginScan( repoConfiguration, null );
String repoRoot = prepareTestRepos();
repoPurgeConsumer.processFile( CleanupReleasedSnapshotsRepositoryPurgeTest.PATH_TO_RELEASED_SNAPSHOT_IN_SAME_REPO );
String projectRoot = repoRoot + "/org/apache/maven/plugins/maven-plugin-plugin";
// check if the snapshot was removed
assertDeleted( projectRoot + "/2.3-SNAPSHOT" );