Search in sources :

Example 1 with HttpDownload

use of org.commonjava.maven.galley.transport.htcli.internal.HttpDownload in project indy by Commonjava.

the class MavenContentFilteringTransferDecoratorTest method getTestHttpTransfer.

private Transfer getTestHttpTransfer(final String path, final String content) throws Exception {
    fixture.expect("GET", fixture.formatUrl(path), 200, content);
    final String baseUri = fixture.getBaseUri();
    final SimpleHttpLocation location = new SimpleHttpLocation("test", baseUri, false, true, true, true, null);
    final Transfer transfer = fixture.getTransfer(new ConcreteResource(location, path));
    final String url = fixture.formatUrl(path);
    assertThat(transfer.exists(), equalTo(false));
    HttpDownload dl = new HttpDownload(url, location, transfer, new HashMap<>(), new EventMetadata(), fixture.getHttp().getHttp(), new ObjectMapper(), true, metricRegistry, metricConfig);
    return dl.call().getTransfer();
}
Also used : SimpleHttpLocation(org.commonjava.maven.galley.transport.htcli.model.SimpleHttpLocation) HttpDownload(org.commonjava.maven.galley.transport.htcli.internal.HttpDownload) Transfer(org.commonjava.maven.galley.model.Transfer) ConcreteResource(org.commonjava.maven.galley.model.ConcreteResource) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) EventMetadata(org.commonjava.maven.galley.event.EventMetadata)

Aggregations

ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 EventMetadata (org.commonjava.maven.galley.event.EventMetadata)1 ConcreteResource (org.commonjava.maven.galley.model.ConcreteResource)1 Transfer (org.commonjava.maven.galley.model.Transfer)1 HttpDownload (org.commonjava.maven.galley.transport.htcli.internal.HttpDownload)1 SimpleHttpLocation (org.commonjava.maven.galley.transport.htcli.model.SimpleHttpLocation)1