Search in sources :

Example 6 with Config

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

the class HttpTestServerTest method getHttps.

public HttpTestServer getHttps() throws Exception {
    HttpTestServer.Config config = new Config();
    config.https = true;
    HttpTestServer http = new HttpTestServer(config);
    http.start();
    return http;
}
Also used : Config(aQute.http.testservers.HttpTestServer.Config) Config(aQute.http.testservers.HttpTestServer.Config) HttpTestServer(aQute.http.testservers.HttpTestServer)

Example 7 with Config

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

the class HttpClientTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    Config config = new Config();
    config.https = false;
    httpServer = new TestServer(config);
    httpServer.start();
    Config configs = new Config();
    configs.https = true;
    httpsServer = new Httpbin(configs);
    httpsServer.start();
    tmp = IO.getFile("generated/tmp");
    IO.delete(tmp);
    tmp.mkdirs();
}
Also used : Config(aQute.http.testservers.HttpTestServer.Config) Httpbin(aQute.http.testservers.Httpbin)

Example 8 with Config

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

the class RemoteRepoTest 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");
    Config config = new Config();
    fnx = new FakeNexus(config, remote);
    fnx.start();
    IO.delete(remote);
    IO.delete(local);
    remote.mkdirs();
    local.mkdirs();
    reporter.setTrace(true);
    repo = new MavenRemoteRepository(local, new HttpClient(), fnx.getBaseURI() + "/repo/", reporter);
}
Also used : Config(aQute.http.testservers.HttpTestServer.Config) HttpClient(aQute.bnd.http.HttpClient)

Example 9 with Config

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

the class HttpTestServerTest method getHttp.

public HttpTestServer getHttp() throws Exception {
    HttpTestServer.Config config = new Config();
    config.https = false;
    HttpTestServer http = new Httpbin(config);
    http.start();
    return http;
}
Also used : Config(aQute.http.testservers.HttpTestServer.Config) Config(aQute.http.testservers.HttpTestServer.Config) Httpbin(aQute.http.testservers.Httpbin) HttpTestServer(aQute.http.testservers.HttpTestServer)

Example 10 with Config

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

the class MavenBndRepoTest method setUp.

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

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