Search in sources :

Example 1 with NullTestEnvironment

use of org.opennms.smoketest.NullTestEnvironment 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 2 with NullTestEnvironment

use of org.opennms.smoketest.NullTestEnvironment 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 3 with NullTestEnvironment

use of org.opennms.smoketest.NullTestEnvironment 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 4 with NullTestEnvironment

use of org.opennms.smoketest.NullTestEnvironment 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 5 with NullTestEnvironment

use of org.opennms.smoketest.NullTestEnvironment in project opennms by OpenNMS.

the class DiscoveryIT method getTestEnvironment.

@ClassRule
public static final TestEnvironment getTestEnvironment() {
    if (!OpenNMSSeleniumTestCase.isDockerEnabled()) {
        return new NullTestEnvironment();
    }
    try {
        final TestEnvironmentBuilder builder = TestEnvironment.builder().all();
        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)

Aggregations

ClassRule (org.junit.ClassRule)7 NullTestEnvironment (org.opennms.smoketest.NullTestEnvironment)7 TestEnvironmentBuilder (org.opennms.test.system.api.TestEnvironmentBuilder)7