Search in sources :

Example 1 with Config

use of aQute.http.testservers.HttpTestServer.Config in project bnd by bndtools.

the class OSGiRepositoryTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    tmp = IO.getFile("generated/tmp/test/" + getName());
    cache = IO.getFile(tmp, "cache");
    remote = IO.getFile(tmp, "testdata");
    ws = IO.getFile(tmp, "ws");
    IO.delete(tmp);
    Config config = new Config();
    fnx = new FakeNexus(config, remote);
    fnx.start();
    remote.mkdirs();
    IO.copy(IO.getFile("testdata/minir5.xml"), IO.getFile(remote, "minir5.xml"));
    IO.copy(IO.getFile("testdata/bundles"), IO.getFile(remote, "bundles"));
}
Also used : Config(aQute.http.testservers.HttpTestServer.Config) FakeNexus(aQute.maven.provider.FakeNexus)

Example 2 with Config

use of aQute.http.testservers.HttpTestServer.Config in project bnd by bndtools.

the class MavenRepoTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    tmpName = "generated/tmp/test/" + getName();
    local = IO.getFile(tmpName + "/local");
    remote = IO.getFile(tmpName + "/remote");
    reporter.setTrace(true);
    Config config = new Config();
    fnx = new FakeNexus(config, remote);
    fnx.start();
    IO.delete(remote);
    IO.delete(local);
    IO.copy(IO.getFile("testresources/mavenrepo"), remote);
    remote.mkdirs();
    local.mkdirs();
    repo = MavenBackingRepository.create(fnx.getBaseURI() + "/repo/", reporter, local, new HttpClient());
    storage = new MavenRepository(local, "fnexus", this.repo, this.repo, null, null, null);
}
Also used : Config(aQute.http.testservers.HttpTestServer.Config) HttpClient(aQute.bnd.http.HttpClient)

Example 3 with Config

use of aQute.http.testservers.HttpTestServer.Config in project bnd by bndtools.

the class NexusTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    tmpName = "generated/tmp/test/" + getName();
    local = IO.getFile(tmpName + "/local");
    reporter.setTrace(true);
    Config config = new Config();
    IO.delete(local);
    local.mkdirs();
    HttpClient httpClient = new HttpClient();
    httpClient.addURLConnectionHandler(new BasicAuthentication("deployment", "deployment123", Workspace.log));
    repo = new MavenRemoteRepository(local, httpClient, "http://localhost:8081/nexus/content/repositories/snapshots/", reporter);
}
Also used : Config(aQute.http.testservers.HttpTestServer.Config) HttpClient(aQute.bnd.http.HttpClient) BasicAuthentication(aQute.bnd.url.BasicAuthentication)

Example 4 with Config

use of aQute.http.testservers.HttpTestServer.Config in project bnd by bndtools.

the class CentralTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    tmpName = "generated/tmp/test/" + getName();
    local = IO.getFile(tmpName + "/local");
    reporter.setTrace(true);
    Config config = new Config();
    IO.delete(local);
    local.mkdirs();
    repo = MavenRemoteRepository.create(REPO_URL, reporter, local, new HttpClient());
    storage = new MavenRepository(local, "central", this.repo, null, null, null, null);
}
Also used : Config(aQute.http.testservers.HttpTestServer.Config) HttpClient(aQute.bnd.http.HttpClient)

Example 5 with Config

use of aQute.http.testservers.HttpTestServer.Config in project bnd by bndtools.

the class HttpClientCacheTest method setUp.

public void setUp() throws Exception {
    IO.delete(tmp);
    tmp.mkdirs();
    Config config = new Config();
    config.https = false;
    httpServer = new MyHttpBin(config);
    httpServer.start();
}
Also used : Config(aQute.http.testservers.HttpTestServer.Config)

Aggregations

Config (aQute.http.testservers.HttpTestServer.Config)13 HttpClient (aQute.bnd.http.HttpClient)4 Httpbin (aQute.http.testservers.Httpbin)3 FakeNexus (aQute.maven.provider.FakeNexus)3 HttpTestServer (aQute.http.testservers.HttpTestServer)2 BasicAuthentication (aQute.bnd.url.BasicAuthentication)1 FileNotFoundException (java.io.FileNotFoundException)1 URL (java.net.URL)1