mirror of
https://github.com/apache/archiva.git
synced 2025-02-20 17:04:57 +00:00
Added 1 more unit test cases
git-svn-id: https://svn.apache.org/repos/asf/maven/repository-manager/trunk@354333 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
580d326d8e
commit
9d70ac69ed
@ -214,6 +214,25 @@ public void testMissingMetadataPlugin()
|
||||
assertEquals( "check reason", "Metadata plugin missing-plugin not found in the repository", result.getReason() );
|
||||
assertFalse( "check no more failures", failures.hasNext() );
|
||||
}
|
||||
|
||||
public void testIncompletePluginMetadata()
|
||||
throws ReportProcessorException
|
||||
{
|
||||
ArtifactReporter reporter = new MockArtifactReporter();
|
||||
|
||||
RepositoryMetadata metadata = new GroupRepositoryMetadata( "groupId" );
|
||||
metadata.getMetadata().addPlugin( createMetadataPlugin( "artifactId", "default" ) );
|
||||
|
||||
badMetadataReportProcessor.processMetadata( metadata, repository, reporter );
|
||||
|
||||
Iterator failures = reporter.getRepositoryMetadataFailureIterator();
|
||||
assertTrue( "check there is a failure", failures.hasNext() );
|
||||
RepositoryMetadataResult result = (RepositoryMetadataResult) failures.next();
|
||||
// TODO: should be more robust
|
||||
assertEquals( "check reason", "Plugin snapshot-artifact is present in the repository but " +
|
||||
"missing in the metadata.", result.getReason() );
|
||||
assertFalse( "check no more failures", failures.hasNext() );
|
||||
}
|
||||
|
||||
public void testInvalidPluginArtifactId()
|
||||
throws ReportProcessorException
|
||||
|
Loading…
x
Reference in New Issue
Block a user