aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-web
diff options
context:
space:
mode:
authorJoakim Erdfelt <joakime@apache.org>2007-10-24 00:19:39 +0000
committerJoakim Erdfelt <joakime@apache.org>2007-10-24 00:19:39 +0000
commit365460eaa794a80479c4c2a0dedbed7728f680c2 (patch)
treea7c5b77ce91af034910a4249a6a44c7b3bb24e03 /archiva-web
parente0d19c4d9744caa54342eeb079b7f67ff11526c7 (diff)
downloadarchiva-365460eaa794a80479c4c2a0dedbed7728f680c2.tar.gz
archiva-365460eaa794a80479c4c2a0dedbed7728f680c2.zip
[MRM-565] Archiva 1.0-beta-3 fails in 404 on all legacy request.
Added test for get of artifact using legacy path. git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@587710 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-web')
-rw-r--r--archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/repository/RepositoryServletTest.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/repository/RepositoryServletTest.java b/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/repository/RepositoryServletTest.java
index c0b24cee5..fb4560bbe 100644
--- a/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/repository/RepositoryServletTest.java
+++ b/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/repository/RepositoryServletTest.java
@@ -292,6 +292,29 @@ public class RepositoryServletTest
assertEquals( "Expected file contents", expectedArtifactContents, response.getText() );
}
+ public void testGetNoProxyArtifactLegacyLayout()
+ throws Exception
+ {
+ RepositoryServlet servlet = (RepositoryServlet) sc.newInvocation( REQUEST_PATH ).getServlet();
+ assertNotNull( servlet );
+ assertRepositoryValid( servlet, REPOSITORY_ID );
+
+ String commonsLangJar = "commons-lang/commons-lang/2.1/commons-lang-2.1.jar";
+ String expectedArtifactContents = "dummy-commons-lang-artifact";
+
+ File artifactFile = new File( repositoryLocation, commonsLangJar );
+ artifactFile.getParentFile().mkdirs();
+
+ FileUtils.writeStringToFile( artifactFile, expectedArtifactContents, null );
+
+ WebRequest request = new GetMethodWebRequest( "http://machine.com/repository/internal/" +
+ "commons-lang/jars/commons-lang-2.1.jar" );
+ WebResponse response = sc.getResponse( request );
+ assertEquals( "Response OK", HttpServletResponse.SC_OK, response.getResponseCode() );
+
+ assertEquals( "Expected file contents", expectedArtifactContents, response.getText() );
+ }
+
public void testMimeTypesAvailable()
throws Exception
{