Search in sources :

Example 11 with Config

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

the class AgainstNexusTest 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");
    local.mkdirs();
    IO.copy(IO.getFile("testresources/nexus/index.maven"), index);
    Config config = new HttpTestServer.Config();
    try {
        new URL(HTTP_LOCALHOST_8081).openStream();
        skip = false;
    } catch (FileNotFoundException e) {
        skip = false;
    } catch (Exception e) {
        skip = true;
    }
    skip = true;
}
Also used : Config(aQute.http.testservers.HttpTestServer.Config) FileNotFoundException(java.io.FileNotFoundException) URL(java.net.URL) FileNotFoundException(java.io.FileNotFoundException)

Example 12 with Config

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

the class WorkspaceTest 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");
    build = IO.getFile(tmp, "workspace/cnf/build.bnd");
    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)

Example 13 with Config

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

the class HttpClientServerTest method createSecureServer.

public void createSecureServer() throws Exception {
    Config config = new Config();
    config.https = true;
    httpServer = new Httpbin(config);
    httpServer.start();
}
Also used : Config(aQute.http.testservers.HttpTestServer.Config) Httpbin(aQute.http.testservers.Httpbin)

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