/**
* RepositoryServletTest
- *
- *
*/
public class RepositoryServletNoProxyTest
extends AbstractRepositoryServletTestCase
File checksumFile = new File( repoRootInternal, commonsLangSha1 );
checksumFile.getParentFile().mkdirs();
- FileUtils.writeStringToFile( checksumFile, "dummy-checksum", Charset.defaultCharset() );
+ FileUtils.writeStringToFile( checksumFile, "dummy-checksum", Charset.defaultCharset() );
//WebRequest request = new GetMethodWebRequest( "http://machine.com/repository/internal/" + commonsLangSha1 );
WebResponse response = getWebResponse( "/repository/internal/" + commonsLangSha1 );
File checksumFile = new File( repoRootInternal, commonsLangSha1 );
checksumFile.getParentFile().mkdirs();
- FileUtils.writeStringToFile( checksumFile, "dummy-checksum", Charset.defaultCharset() );
+ FileUtils.writeStringToFile( checksumFile, "dummy-checksum", Charset.defaultCharset() );
//WebRequest request = new WebRequest( "http://machine.com/repository/internal/" + commonsLangSha1 );
WebResponse response = getWebResponse( "/repository/internal/" + commonsLangSha1 );
File checksumFile = new File( repoRootInternal, commonsLangSha1 );
checksumFile.getParentFile().mkdirs();
- FileUtils.writeStringToFile( checksumFile, "dummy-checksum", Charset.defaultCharset() );
+ FileUtils.writeStringToFile( checksumFile, "dummy-checksum", Charset.defaultCharset() );
//WebRequest request = new GetMethodWebRequest(
// "http://machine.com/repository/internal/" + "commons-lang/jars/commons-lang-2.1.jar.sha1" );
- WebResponse response = getWebResponse( "/repository/internal/" + "commons-lang/jars/commons-lang-2.1.jar.sha1" );
- assertResponseOK( response );
-
- assertEquals( "Expected file contents", "dummy-checksum", response.getContentAsString() );
+ WebResponse response =
+ getWebResponse( "/repository/internal/" + "commons-lang/jars/commons-lang-2.1.jar.sha1" );
+ assertResponseNotFound( response );
}
@Test
File metadataFile = new File( repoRootInternal, commonsLangMetadata );
metadataFile.getParentFile().mkdirs();
- FileUtils.writeStringToFile( metadataFile, expectedMetadataContents, Charset.defaultCharset() );
+ FileUtils.writeStringToFile( metadataFile, expectedMetadataContents, Charset.defaultCharset() );
//WebRequest request = new GetMethodWebRequest( "http://machine.com/repository/internal/" + commonsLangMetadata );
WebResponse response = getWebResponse( "/repository/internal/" + commonsLangMetadata );
File metadataFile = new File( repoRootInternal, commonsLangMetadata );
metadataFile.getParentFile().mkdirs();
- FileUtils.writeStringToFile( metadataFile, expectedMetadataContents, Charset.defaultCharset() );
+ FileUtils.writeStringToFile( metadataFile, expectedMetadataContents, Charset.defaultCharset() );
//WebRequest request = new GetMethodWebRequest( "http://machine.com/repository/internal/" + commonsLangMetadata );
WebResponse response = getWebResponse( "/repository/internal/" + commonsLangMetadata );
File metadataFile = new File( repoRootInternal, commonsLangMetadata );
metadataFile.getParentFile().mkdirs();
- FileUtils.writeStringToFile( metadataFile, expectedMetadataContents, Charset.defaultCharset() );
+ FileUtils.writeStringToFile( metadataFile, expectedMetadataContents, Charset.defaultCharset() );
//WebRequest request = new GetMethodWebRequest( "http://machine.com/repository/internal/" + commonsLangMetadata );
WebResponse response = getWebResponse( "/repository/internal/" + commonsLangMetadata );
File artifactFile = new File( repoRootInternal, commonsLangJar );
artifactFile.getParentFile().mkdirs();
- FileUtils.writeStringToFile( artifactFile, expectedArtifactContents, Charset.defaultCharset() );
+ FileUtils.writeStringToFile( artifactFile, expectedArtifactContents, Charset.defaultCharset() );
//WebRequest request = new GetMethodWebRequest( "http://machine.com/repository/internal/" + commonsLangJar );
WebResponse response = getWebResponse( "/repository/internal/" + commonsLangJar );
File artifactFile = new File( repoRootInternal, commonsLangJar );
artifactFile.getParentFile().mkdirs();
- FileUtils.writeStringToFile( artifactFile, expectedArtifactContents, Charset.defaultCharset() );
+ FileUtils.writeStringToFile( artifactFile, expectedArtifactContents, Charset.defaultCharset() );
//WebRequest request = new GetMethodWebRequest(
// "http://machine.com/repository/internal/" + "commons-lang/jars/commons-lang-2.1.jar" );
WebResponse response = getWebResponse( "/repository/internal/" + "commons-lang/jars/commons-lang-2.1.jar" );
- assertResponseOK( response );
+ assertResponseNotFound( response );
- assertEquals( "Expected file contents", expectedArtifactContents, response.getContentAsString() );
}
@Test
File artifactFile = new File( repoRootInternal, commonsLangJar );
artifactFile.getParentFile().mkdirs();
- FileUtils.writeStringToFile( artifactFile, expectedArtifactContents, Charset.defaultCharset() );
+ FileUtils.writeStringToFile( artifactFile, expectedArtifactContents, Charset.defaultCharset() );
//WebRequest request = new GetMethodWebRequest( "http://machine.com/repository/internal/" + commonsLangJar );
WebResponse response = getWebResponse( "/repository/internal/" + commonsLangJar );
File artifactFile = new File( repoRootInternal, commonsLangJar );
artifactFile.getParentFile().mkdirs();
- FileUtils.writeStringToFile( artifactFile, expectedArtifactContents, Charset.defaultCharset() );
+ FileUtils.writeStringToFile( artifactFile, expectedArtifactContents, Charset.defaultCharset() );
//WebRequest request = new GetMethodWebRequest(
// "http://machine.com/repository/internal/" + "commons-lang/jars/commons-lang-2.1-SNAPSHOT.jar" );
File artifactFile = new File( repoRootInternal, commonsLangJar );
artifactFile.getParentFile().mkdirs();
- FileUtils.writeStringToFile( artifactFile, expectedArtifactContents, Charset.defaultCharset() );
+ FileUtils.writeStringToFile( artifactFile, expectedArtifactContents, Charset.defaultCharset() );
//WebRequest request = new GetMethodWebRequest( "http://machine.com/repository/internal/" + commonsLangJar );
WebResponse response = getWebResponse( "/repository/internal/" + commonsLangJar );
File artifactFile = new File( repoRootInternal, commonsLangJar );
artifactFile.getParentFile().mkdirs();
- FileUtils.writeStringToFile( artifactFile, expectedArtifactContents, Charset.defaultCharset() );
+ FileUtils.writeStringToFile( artifactFile, expectedArtifactContents, Charset.defaultCharset() );
WebRequest request = new GetMethodWebRequest(
"http://machine.com/repository/internal/" + "commons-lang/jars/commons-lang-2.1-20050821.023400-1.jar" );
WebResponse response = getServletUnitClient().getResponse( request );
- assertResponseOK( response );
-
- assertEquals( "Expected file contents", expectedArtifactContents, response.getContentAsString() );
+ assertResponseNotFound( response );
}
/**
File checksumFile = new File( repoRootInternal, dualExtensionPath );
checksumFile.getParentFile().mkdirs();
- FileUtils.writeStringToFile( checksumFile, expectedContents, Charset.defaultCharset() );
+ FileUtils.writeStringToFile( checksumFile, expectedContents, Charset.defaultCharset() );
WebRequest request = new GetMethodWebRequest( "http://machine.com/repository/internal/" + dualExtensionPath );
WebResponse response = getServletUnitClient().getResponse( request );
File checksumFile = new File( repoRootInternal, dualExtensionPath );
checksumFile.getParentFile().mkdirs();
- FileUtils.writeStringToFile( checksumFile, expectedContents, Charset.defaultCharset() );
+ FileUtils.writeStringToFile( checksumFile, expectedContents, Charset.defaultCharset() );
WebRequest request = new GetMethodWebRequest(
"http://machine.com/repository/internal/" + "org.project/distributions/example-presentation-3.2.zip" );
WebResponse response = getServletUnitClient().getResponse( request );
- assertResponseOK( response );
+ assertResponseNotFound( response );
- assertEquals( "Expected file contents", expectedContents, response.getContentAsString() );
}
@Test
File checksumFile = new File( repoRootLegacy, "commons-lang/jars/commons-lang-2.1.jar.sha1" );
checksumFile.getParentFile().mkdirs();
- FileUtils.writeStringToFile( checksumFile, "dummy-checksum", Charset.defaultCharset() );
+ FileUtils.writeStringToFile( checksumFile, "dummy-checksum", Charset.defaultCharset() );
WebRequest request = new GetMethodWebRequest( "http://machine.com/repository/legacy/" + commonsLangSha1 );
WebResponse response = getServletUnitClient().getResponse( request );
File checksumFile = new File( repoRootLegacy, commonsLangSha1 );
checksumFile.getParentFile().mkdirs();
- FileUtils.writeStringToFile( checksumFile, "dummy-checksum", Charset.defaultCharset() );
+ FileUtils.writeStringToFile( checksumFile, "dummy-checksum", Charset.defaultCharset() );
WebRequest request = new GetMethodWebRequest( "http://machine.com/repository/legacy/" + commonsLangSha1 );
WebResponse response = getServletUnitClient().getResponse( request );
File metadataFile = new File( repoRootLegacy, commonsLangMetadata );
metadataFile.getParentFile().mkdirs();
- FileUtils.writeStringToFile( metadataFile, expectedMetadataContents, Charset.defaultCharset() );
+ FileUtils.writeStringToFile( metadataFile, expectedMetadataContents, Charset.defaultCharset() );
WebRequest request = new GetMethodWebRequest( "http://machine.com/repository/legacy/" + commonsLangMetadata );
WebResponse response = getServletUnitClient().getResponse( request );
File metadataFile = new File( repoRootLegacy, commonsLangMetadata );
metadataFile.getParentFile().mkdirs();
- FileUtils.writeStringToFile( metadataFile, expectedMetadataContents, Charset.defaultCharset() );
+ FileUtils.writeStringToFile( metadataFile, expectedMetadataContents, Charset.defaultCharset() );
WebRequest request = new GetMethodWebRequest( "http://machine.com/repository/legacy/" + commonsLangMetadata );
WebResponse response = getServletUnitClient().getResponse( request );
File metadataFile = new File( repoRootLegacy, commonsLangMetadata );
metadataFile.getParentFile().mkdirs();
- FileUtils.writeStringToFile( metadataFile, expectedMetadataContents, Charset.defaultCharset() );
+ FileUtils.writeStringToFile( metadataFile, expectedMetadataContents, Charset.defaultCharset() );
WebRequest request = new GetMethodWebRequest( "http://machine.com/repository/legacy/" + commonsLangMetadata );
WebResponse response = getServletUnitClient().getResponse( request );
File artifactFile = new File( repoRootLegacy, "commons-lang/jars/commons-lang-2.1.jar" );
artifactFile.getParentFile().mkdirs();
- FileUtils.writeStringToFile( artifactFile, expectedArtifactContents, Charset.defaultCharset() );
+ FileUtils.writeStringToFile( artifactFile, expectedArtifactContents, Charset.defaultCharset() );
WebRequest request = new GetMethodWebRequest( "http://machine.com/repository/legacy/" + commonsLangJar );
WebResponse response = getServletUnitClient().getResponse( request );
File artifactFile = new File( repoRootLegacy, commonsLangJar );
artifactFile.getParentFile().mkdirs();
- FileUtils.writeStringToFile( artifactFile, expectedArtifactContents, Charset.defaultCharset() );
+ FileUtils.writeStringToFile( artifactFile, expectedArtifactContents, Charset.defaultCharset() );
WebRequest request = new GetMethodWebRequest( "http://machine.com/repository/legacy/" + commonsLangJar );
WebResponse response = getServletUnitClient().getResponse( request );
File artifactFile = new File( repoRootLegacy, "commons-lang/jars/commons-lang-2.1-SNAPSHOT.jar" );
artifactFile.getParentFile().mkdirs();
- FileUtils.writeStringToFile( artifactFile, expectedArtifactContents, Charset.defaultCharset() );
+ FileUtils.writeStringToFile( artifactFile, expectedArtifactContents, Charset.defaultCharset() );
WebRequest request = new GetMethodWebRequest( "http://machine.com/repository/legacy/" + commonsLangJar );
WebResponse response = getServletUnitClient().getResponse( request );
File artifactFile = new File( repoRootLegacy, commonsLangJar );
artifactFile.getParentFile().mkdirs();
- FileUtils.writeStringToFile( artifactFile, expectedArtifactContents, Charset.defaultCharset() );
+ FileUtils.writeStringToFile( artifactFile, expectedArtifactContents, Charset.defaultCharset() );
WebRequest request = new GetMethodWebRequest( "http://machine.com/repository/legacy/" + commonsLangJar );
WebResponse response = getServletUnitClient().getResponse( request );
- assertResponseOK( response );
-
- assertEquals( "Expected file contents", expectedArtifactContents, response.getContentAsString() );
+ assertResponseNotFound( response );
}
@Test
File artifactFile = new File( repoRootLegacy, "commons-lang/jars/" + filename );
artifactFile.getParentFile().mkdirs();
- FileUtils.writeStringToFile( artifactFile, expectedArtifactContents, Charset.defaultCharset() );
+ FileUtils.writeStringToFile( artifactFile, expectedArtifactContents, Charset.defaultCharset() );
WebRequest request = new GetMethodWebRequest( "http://machine.com/repository/legacy/" + commonsLangJar );
WebResponse response = getServletUnitClient().getResponse( request );
File artifactFile = new File( repoRootLegacy, commonsLangJar );
artifactFile.getParentFile().mkdirs();
- FileUtils.writeStringToFile( artifactFile, expectedArtifactContents, Charset.defaultCharset() );
+ FileUtils.writeStringToFile( artifactFile, expectedArtifactContents, Charset.defaultCharset() );
WebRequest request = new GetMethodWebRequest( "http://machine.com/repository/legacy/" + commonsLangJar );
WebResponse response = getServletUnitClient().getResponse( request );
File checksumFile = new File( repoRootLegacy, "org.project/distributions/example-presentation-3.2.xml.zip" );
checksumFile.getParentFile().mkdirs();
- FileUtils.writeStringToFile( checksumFile, expectedContents, Charset.defaultCharset() );
+ FileUtils.writeStringToFile( checksumFile, expectedContents, Charset.defaultCharset() );
WebRequest request = new GetMethodWebRequest( "http://machine.com/repository/legacy/" + dualExtensionPath );
WebResponse response = getServletUnitClient().getResponse( request );
File checksumFile = new File( repoRootLegacy, dualExtensionPath );
checksumFile.getParentFile().mkdirs();
- FileUtils.writeStringToFile( checksumFile, expectedContents, Charset.defaultCharset() );
+ FileUtils.writeStringToFile( checksumFile, expectedContents, Charset.defaultCharset() );
WebRequest request = new GetMethodWebRequest( "http://machine.com/repository/legacy/" + dualExtensionPath );
WebResponse response = getServletUnitClient().getResponse( request );