Search in sources :

Example 1 with WebserverForTest

use of org.webpieces.plugins.fortesting.WebserverForTest in project webpieces by deanhiller.

the class TestPropertiesPlugin method setUp.

@Before
public void setUp() throws InterruptedException, ExecutionException, TimeoutException {
    VirtualFileClasspath metaFile = new VirtualFileClasspath("propertiesMeta.txt", TestPropertiesPlugin.class.getClassLoader());
    TestConfig config = new TestConfig();
    config.setPlatformOverrides(getOverrides(false, new SimpleMeterRegistry()));
    config.setAppOverrides(new TestLoginModule());
    config.setMetaFile(metaFile);
    WebserverForTest webserver = new WebserverForTest(config);
    webserver.start();
    http11Socket = connectHttp(false, webserver.getUnderlyingHttpChannel().getLocalAddress());
    https11Socket = connectHttps(false, null, webserver.getUnderlyingHttpsChannel().getLocalAddress());
}
Also used : TestConfig(org.webpieces.plugins.fortesting.TestConfig) WebserverForTest(org.webpieces.plugins.fortesting.WebserverForTest) SimpleMeterRegistry(io.micrometer.core.instrument.simple.SimpleMeterRegistry) VirtualFileClasspath(org.webpieces.util.file.VirtualFileClasspath) Before(org.junit.Before)

Example 2 with WebserverForTest

use of org.webpieces.plugins.fortesting.WebserverForTest in project webpieces by deanhiller.

the class TestDocs method setUp.

@Before
public void setUp() throws InterruptedException, ExecutionException, TimeoutException {
    VirtualFileClasspath metaFile = new VirtualFileClasspath("documentationMeta.txt", TestDocs.class.getClassLoader());
    TestConfig config = new TestConfig();
    config.setPlatformOverrides(getOverrides(false, new SimpleMeterRegistry()));
    config.setAppOverrides(new TestLoginModule());
    config.setMetaFile(metaFile);
    WebserverForTest webserver = new WebserverForTest(config);
    webserver.start();
    http11Socket = connectHttp(false, webserver.getUnderlyingHttpChannel().getLocalAddress());
    https11Socket = connectHttps(false, null, webserver.getUnderlyingHttpsChannel().getLocalAddress());
}
Also used : TestConfig(org.webpieces.plugins.fortesting.TestConfig) WebserverForTest(org.webpieces.plugins.fortesting.WebserverForTest) SimpleMeterRegistry(io.micrometer.core.instrument.simple.SimpleMeterRegistry) VirtualFileClasspath(org.webpieces.util.file.VirtualFileClasspath) Before(org.junit.Before)

Example 3 with WebserverForTest

use of org.webpieces.plugins.fortesting.WebserverForTest in project webpieces by deanhiller.

the class TestSslSetup method setUp.

@Before
public void setUp() throws InterruptedException, ExecutionException, TimeoutException {
    VirtualFileClasspath metaFile = new VirtualFileClasspath("sslMeta.txt", TestSslSetup.class.getClassLoader());
    TestConfig config = new TestConfig();
    config.setPlatformOverrides(getOverrides(false, new SimpleMeterRegistry()));
    config.setAppOverrides(new SslTestModule());
    config.setMetaFile(metaFile);
    WebserverForTest webserver = new WebserverForTest(config);
    webserver.start();
    http11Socket = connectHttp(false, webserver.getUnderlyingHttpChannel().getLocalAddress());
    https11Socket = connectHttps(false, null, webserver.getUnderlyingHttpsChannel().getLocalAddress());
}
Also used : TestConfig(org.webpieces.plugins.fortesting.TestConfig) WebserverForTest(org.webpieces.plugins.fortesting.WebserverForTest) SimpleMeterRegistry(io.micrometer.core.instrument.simple.SimpleMeterRegistry) VirtualFileClasspath(org.webpieces.util.file.VirtualFileClasspath) Before(org.junit.Before)

Example 4 with WebserverForTest

use of org.webpieces.plugins.fortesting.WebserverForTest in project webpieces by deanhiller.

the class TestFullSslSetupWizard method setUp.

@Before
public void setUp() throws InterruptedException, ExecutionException, TimeoutException {
    VirtualFileClasspath metaFile = new VirtualFileClasspath("sslMeta.txt", TestFullSslSetupWizard.class.getClassLoader());
    TestConfig config = new TestConfig();
    config.setPlatformOverrides(getOverrides(false, new SimpleMeterRegistry()));
    config.setAppOverrides(new SslTestModule());
    config.setMetaFile(metaFile);
    WebserverForTest webserver = new WebserverForTest(config);
    webserver.start();
    http11Socket = connectHttp(false, webserver.getUnderlyingHttpChannel().getLocalAddress());
    https11Socket = connectHttps(false, null, webserver.getUnderlyingHttpsChannel().getLocalAddress());
}
Also used : TestConfig(org.webpieces.plugins.fortesting.TestConfig) WebserverForTest(org.webpieces.plugins.fortesting.WebserverForTest) SimpleMeterRegistry(io.micrometer.core.instrument.simple.SimpleMeterRegistry) VirtualFileClasspath(org.webpieces.util.file.VirtualFileClasspath) Before(org.junit.Before)

Example 5 with WebserverForTest

use of org.webpieces.plugins.fortesting.WebserverForTest in project webpieces by deanhiller.

the class TestLogin method setUp.

@Before
public void setUp() throws InterruptedException, ExecutionException, TimeoutException {
    VirtualFileClasspath metaFile = new VirtualFileClasspath("backendMeta.txt", TestLogin.class.getClassLoader());
    TestConfig config = new TestConfig();
    config.setPlatformOverrides(getOverrides(false, new SimpleMeterRegistry()));
    config.setAppOverrides(new TestLoginModule());
    config.setMetaFile(metaFile);
    WebserverForTest webserver = new WebserverForTest(config);
    webserver.start();
    http11Socket = connectHttp(false, webserver.getUnderlyingHttpChannel().getLocalAddress());
    https11Socket = connectHttps(false, null, webserver.getUnderlyingHttpsChannel().getLocalAddress());
}
Also used : TestConfig(org.webpieces.plugins.fortesting.TestConfig) WebserverForTest(org.webpieces.plugins.fortesting.WebserverForTest) SimpleMeterRegistry(io.micrometer.core.instrument.simple.SimpleMeterRegistry) VirtualFileClasspath(org.webpieces.util.file.VirtualFileClasspath) Before(org.junit.Before)

Aggregations

SimpleMeterRegistry (io.micrometer.core.instrument.simple.SimpleMeterRegistry)5 Before (org.junit.Before)5 TestConfig (org.webpieces.plugins.fortesting.TestConfig)5 WebserverForTest (org.webpieces.plugins.fortesting.WebserverForTest)5 VirtualFileClasspath (org.webpieces.util.file.VirtualFileClasspath)5