mirror of https://github.com/apache/archiva.git
test invalid snapshot version when used as a base
PR: MRM-9 git-svn-id: https://svn.apache.org/repos/asf/maven/repository-manager/trunk@349672 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
824ecd2c84
commit
6597c5279f
|
@ -190,6 +190,28 @@ public class DefaultArtifactDiscovererTest
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testKickoutWithSnapshotBaseVersion()
|
||||||
|
{
|
||||||
|
List artifacts = discoverer.discoverArtifacts( repositoryLocation, null, false );
|
||||||
|
assertNotNull( "Check artifacts not null", artifacts );
|
||||||
|
boolean found = false;
|
||||||
|
for ( Iterator i = discoverer.getKickedOutPathsIterator(); i.hasNext() && !found; )
|
||||||
|
{
|
||||||
|
String path = (String) i.next();
|
||||||
|
|
||||||
|
found = path.replace( '\\', '/' ).equals(
|
||||||
|
"invalid/invalid/1.0-20050611.123456-1/invalid-1.0-20050611.123456-1.jar" );
|
||||||
|
}
|
||||||
|
assertTrue( "Check kickout was found", found );
|
||||||
|
|
||||||
|
for ( Iterator i = artifacts.iterator(); i.hasNext(); )
|
||||||
|
{
|
||||||
|
Artifact a = (Artifact) i.next();
|
||||||
|
assertFalse( "Check not 'invalid-1.0-20050611-123456-1.jar'",
|
||||||
|
a.getFile().getName().equals( "invalid-1.0-20050611.123456-1.jar" ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void testSnapshotInclusion()
|
public void testSnapshotInclusion()
|
||||||
{
|
{
|
||||||
List artifacts = discoverer.discoverArtifacts( repositoryLocation, null, true );
|
List artifacts = discoverer.discoverArtifacts( repositoryLocation, null, true );
|
||||||
|
|
Loading…
Reference in New Issue