[MRM-1843] provide mechanism to obtain the latest version of an artifact

test for no content
This commit is contained in:
Olivier Lamy 2014-05-21 14:30:32 +10:00
parent 450a8a3732
commit d485a99637
1 changed files with 25 additions and 0 deletions

View File

@ -174,6 +174,31 @@ public class DownloadArtifactFromQueryTest
Assert.assertEquals( "http://localhost:" + port + "/repository/" + id Assert.assertEquals( "http://localhost:" + port + "/repository/" + id
+ "/org/apache/archiva/archiva-test/2.0/archiva-test-2.0.jar", location + "/org/apache/archiva/archiva-test/2.0/archiva-test-2.0.jar", location
); );
}
finally
{
getManagedRepositoriesService().deleteManagedRepository( id, false );
}
}
@Test
public void download_no_content()
throws Exception
{
String id = createAndScanRepo();
try
{
Response response =
getSearchService().redirectToArtifactFile( null, "org.apache.archiva.beer", "archiva-wine", "LATEST", null,
null );
Assert.assertEquals( Response.Status.NO_CONTENT.getStatusCode(), response.getStatus() );
} }
finally finally
{ {