Search in sources :

Example 16 with TestEnvironmentBuilder

use of org.opennms.test.system.api.TestEnvironmentBuilder in project opennms by OpenNMS.

the class JmxRemoteAdminIT method getTestEnvironment.

@ClassRule
public static final TestEnvironment getTestEnvironment() {
    LOG.warn("Setting up Docker test environment.");
    try {
        final TestEnvironmentBuilder builder = TestEnvironment.builder().opennms();
        builder.skipTearDown(Boolean.getBoolean("org.opennms.smoketest.docker.skipTearDown"));
        builder.useExisting(Boolean.getBoolean("org.opennms.smoketest.docker.useExisting"));
        builder.withOpenNMSEnvironment().optIn(false).addFile(OpenNMSSeleniumTestCase.class.getResource("etc/monitoring-locations.xml"), "etc/monitoring-locations.xml").addFiles(Paths.get("src/test/resources/org/opennms/smoketest/etc"), "etc");
        m_testEnvironment = builder.build();
    } catch (final Throwable t) {
        throw new RuntimeException(t);
    }
    return m_testEnvironment;
}
Also used : TestEnvironmentBuilder(org.opennms.test.system.api.TestEnvironmentBuilder) ClassRule(org.junit.ClassRule)

Aggregations

TestEnvironmentBuilder (org.opennms.test.system.api.TestEnvironmentBuilder)16 ClassRule (org.junit.ClassRule)12 NullTestEnvironment (org.opennms.smoketest.NullTestEnvironment)10