Search in sources :

Example 1 with TestEnvironmentBuilder

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

the class DetectorsOnMinionIT method getTestEnvironment.

@ClassRule
public static final TestEnvironment getTestEnvironment() {
    if (!OpenNMSSeleniumTestCase.isDockerEnabled()) {
        return new NullTestEnvironment();
    }
    try {
        final TestEnvironmentBuilder builder = TestEnvironment.builder().all();
        OpenNMSSeleniumTestCase.configureTestEnvironment(builder);
        m_testEnvironment = builder.build();
        return m_testEnvironment;
    } catch (final Throwable t) {
        throw new RuntimeException(t);
    }
}
Also used : TestEnvironmentBuilder(org.opennms.test.system.api.TestEnvironmentBuilder) NullTestEnvironment(org.opennms.smoketest.NullTestEnvironment) ClassRule(org.junit.ClassRule)

Example 2 with TestEnvironmentBuilder

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

the class MinionHeartBeatIT method getTestEnvironment.

@ClassRule
public static final TestEnvironment getTestEnvironment() {
    if (!OpenNMSSeleniumTestCase.isDockerEnabled()) {
        return new NullTestEnvironment();
    }
    try {
        final TestEnvironmentBuilder builder = TestEnvironment.builder().all();
        OpenNMSSeleniumTestCase.configureTestEnvironment(builder);
        m_testEnvironment = builder.build();
        return m_testEnvironment;
    } catch (final Throwable t) {
        throw new RuntimeException(t);
    }
}
Also used : TestEnvironmentBuilder(org.opennms.test.system.api.TestEnvironmentBuilder) NullTestEnvironment(org.opennms.smoketest.NullTestEnvironment) ClassRule(org.junit.ClassRule)

Example 3 with TestEnvironmentBuilder

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

the class CollectorListIT method getTestEnvironment.

@ClassRule
public static final TestEnvironment getTestEnvironment() {
    if (!OpenNMSSeleniumTestCase.isDockerEnabled()) {
        return new NullTestEnvironment();
    }
    try {
        final TestEnvironmentBuilder builder = TestEnvironment.builder().all();
        OpenNMSSeleniumTestCase.configureTestEnvironment(builder);
        m_testEnvironment = builder.build();
        return m_testEnvironment;
    } catch (final Throwable t) {
        throw new RuntimeException(t);
    }
}
Also used : TestEnvironmentBuilder(org.opennms.test.system.api.TestEnvironmentBuilder) NullTestEnvironment(org.opennms.smoketest.NullTestEnvironment) ClassRule(org.junit.ClassRule)

Example 4 with TestEnvironmentBuilder

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

the class TrapIT method getTestEnvironment.

@ClassRule
public static final TestEnvironment getTestEnvironment() {
    if (!OpenNMSSeleniumTestCase.isDockerEnabled()) {
        return new NullTestEnvironment();
    }
    try {
        final TestEnvironmentBuilder builder = TestEnvironment.builder().all();
        builder.withOpenNMSEnvironment().addFile(AbstractSyslogTestCase.class.getResource("/eventconf.xml"), "etc/eventconf.xml").addFile(AbstractSyslogTestCase.class.getResource("/events/Cisco.syslog.events.xml"), "etc/events/Cisco.syslog.events.xml").addFile(AbstractSyslogTestCase.class.getResource("/syslogd-configuration.xml"), "etc/syslogd-configuration.xml").addFile(AbstractSyslogTestCase.class.getResource("/syslog/Cisco.syslog.xml"), "etc/syslog/Cisco.syslog.xml");
        OpenNMSSeleniumTestCase.configureTestEnvironment(builder);
        minionSystem = builder.build();
        return minionSystem;
    } catch (final Throwable t) {
        throw new RuntimeException(t);
    }
}
Also used : TestEnvironmentBuilder(org.opennms.test.system.api.TestEnvironmentBuilder) NullTestEnvironment(org.opennms.smoketest.NullTestEnvironment) ClassRule(org.junit.ClassRule)

Example 5 with TestEnvironmentBuilder

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

the class JMXCollectorIT method getTestEnvironment.

@ClassRule
public static final TestEnvironment getTestEnvironment() {
    if (!OpenNMSSeleniumTestCase.isDockerEnabled()) {
        return new NullTestEnvironment();
    }
    try {
        final TestEnvironmentBuilder builder = TestEnvironment.builder().all();
        OpenNMSSeleniumTestCase.configureTestEnvironment(builder);
        m_testEnvironment = builder.build();
        return m_testEnvironment;
    } catch (final Throwable t) {
        throw new RuntimeException(t);
    }
}
Also used : TestEnvironmentBuilder(org.opennms.test.system.api.TestEnvironmentBuilder) NullTestEnvironment(org.opennms.smoketest.NullTestEnvironment) ClassRule(org.junit.ClassRule)

Aggregations

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