remove old tests that are not required of the code

git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@437125 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Porter 2006-08-26 08:21:22 +00:00
parent e4cfd8fd47
commit ceef0a10fd
4 changed files with 0 additions and 128 deletions

View File

@ -34,20 +34,6 @@ public abstract class AbstractRepositoryReportsTestCase
*/
protected ArtifactRepository repository;
protected static final String remoteRepoUrl = "http://public.planetmirror.com/pub/maven2/";
protected static final String remoteArtifactGroup = "HTTPClient";
protected static final String remoteArtifactId = "HTTPClient";
protected static final String remoteArtifactVersion = "0.3-3";
protected static final String remoteArtifactScope = "compile";
protected static final String remoteArtifactType = "jar";
protected static final String remoteRepoId = "remote-repo";
protected void setUp()
throws Exception
{

View File

@ -135,62 +135,6 @@ public class ChecksumArtifactReporterTest
assertTrue( "check if there is a failure", iter.hasNext() );
}
/**
* Test the checksum of an artifact located in a remote location.
*/
/* public void testChecksumArtifactRemote()
{
ArtifactHandler handler = new DefaultArtifactHandler( remoteArtifactType );
VersionRange version = VersionRange.createFromVersion( remoteArtifactVersion );
Artifact artifact = new DefaultArtifact( remoteArtifactGroup, remoteArtifactId, version, remoteArtifactScope,
remoteArtifactType, "", handler );
ArtifactRepository repository = new DefaultArtifactRepository( remoteRepoId, remoteRepoUrl,
new DefaultRepositoryLayout() );
artifactReportProcessor.processArtifact( null, artifact, reporter, repository );
if ( reporter.getFailures() == 2 )
assertTrue( reporter.getFailures() == 2 );
if ( reporter.getSuccesses() == 2 )
assertTrue( reporter.getSuccesses() == 2 );
}
*/
/**
* Test the checksum of a metadata file located in a remote location.
*/
/* public void testChecksumMetadataRemote()
{
try
{
ArtifactHandler handler = new DefaultArtifactHandler( remoteArtifactType );
VersionRange version = VersionRange.createFromVersion( remoteArtifactVersion );
Artifact artifact = new DefaultArtifact( remoteArtifactGroup, remoteArtifactId, version,
remoteArtifactScope, remoteArtifactType, "", handler );
ArtifactRepository repository = new DefaultArtifactRepository( remoteRepoId, remoteRepoUrl,
new DefaultRepositoryLayout() );
RepositoryMetadata metadata = new SnapshotArtifactRepositoryMetadata( artifact );
metadataReportProcessor.processMetadata( metadata, repository, reporter );
Iterator iter = reporter.getRepositoryMetadataFailureIterator();
if ( iter.hasNext() )
assertTrue( "check if there is a failure", iter.hasNext() );
iter = reporter.getRepositoryMetadataSuccessIterator();
if ( iter.hasNext() )
assertTrue( "check if there is a success", iter.hasNext() );
}
catch ( Exception e )
{
e.printStackTrace();
}
}
*/
/**
* Test the conditional when the checksum files of the artifact & metadata do not exist.
*/

View File

@ -83,27 +83,4 @@ public class InvalidPomArtifactReportProcessorTest
artifactReportProcessor.processArtifact( null, artifact, reporter, repository );
assertEquals( 1, reporter.getWarnings() );
}
/**
* Test the InvalidPomArtifactReportProcessor when the pom is located in
* a remote repository.
*/
/* public void testRemotePomArtifactReportProcessorSuccess(){
try{
ArtifactHandler handler = new DefaultArtifactHandler( "pom" );
VersionRange version = VersionRange.createFromVersion( remoteArtifactVersion );
Artifact artifact = new DefaultArtifact( remoteArtifactGroup, remoteArtifactId, version, remoteArtifactScope,
"pom", "", handler );
ArtifactRepository repository = new DefaultArtifactRepository( remoteRepoId, remoteRepoUrl,
new DefaultRepositoryLayout() );
artifactReportProcessor.processArtifact(null, artifact, reporter, repository);
if(reporter.getSuccesses() == 1)
assertTrue(reporter.getSuccesses() == 1);
}catch(Exception e){
}
}
*/
}

View File

@ -186,39 +186,4 @@ public class LocationArtifactReportProcessorTest
artifactReportProcessor.processArtifact( model, artifact, reporter, repository );
assertEquals( 1, reporter.getFailures() );
}
/**
* Test the LocationArtifactReportProcessor when the artifact is located in the remote repository.
*/
/* public void testRemoteArtifactReportProcessorFailure()
{
ArtifactHandler handler = new DefaultArtifactHandler( remoteArtifactType );
VersionRange version = VersionRange.createFromVersion( remoteArtifactVersion );
Artifact artifact = new DefaultArtifact( remoteArtifactGroup, remoteArtifactId, version, remoteArtifactScope,
remoteArtifactType, "", handler );
ArtifactRepository repository = new DefaultArtifactRepository( remoteRepoId, remoteRepoUrl,
new DefaultRepositoryLayout() );
try
{
URL url = new URL( remoteRepoUrl + remoteArtifactGroup + "/" + remoteArtifactId + "/"
+ remoteArtifactVersion + "/" + remoteArtifactId + "-" + remoteArtifactVersion + ".pom" );
InputStream is = url.openStream();
Reader reader = new InputStreamReader( is );
Model model = pomReader.read( reader );
artifactReportProcessor.processArtifact( model, artifact, reporter, repository );
if ( reporter.getFailures() > 0 )
assertTrue( reporter.getFailures() == 1 );
if ( reporter.getSuccesses() > 0 )
assertTrue( reporter.getSuccesses() == 1 );
}
catch ( Exception e )
{
e.printStackTrace();
}
}
*/
}