diff options
author | Olivier Lamy <olamy@apache.org> | 2014-05-21 14:30:32 +1000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2014-05-21 14:30:32 +1000 |
commit | d485a996378fcaf5b46d78da348c2b20793ed360 (patch) | |
tree | 7275bf055d294e120ddfa2b9dff347a5f183bdd1 /archiva-modules/archiva-web/archiva-web-common | |
parent | 450a8a3732f552ef9a1ed6944f674aa265f2a971 (diff) | |
download | archiva-d485a996378fcaf5b46d78da348c2b20793ed360.tar.gz archiva-d485a996378fcaf5b46d78da348c2b20793ed360.zip |
[MRM-1843] provide mechanism to obtain the latest version of an artifact
test for no content
Diffstat (limited to 'archiva-modules/archiva-web/archiva-web-common')
-rw-r--r-- | archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadArtifactFromQueryTest.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadArtifactFromQueryTest.java b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadArtifactFromQueryTest.java index ce39b6846..c108af3e9 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadArtifactFromQueryTest.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadArtifactFromQueryTest.java @@ -174,6 +174,31 @@ public class DownloadArtifactFromQueryTest Assert.assertEquals( "http://localhost:" + port + "/repository/" + id + "/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 { |