Search in sources :

Example 6 with TestEnvironmentBuilder

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

the class SyslogKafkaElasticsearchBufferingIT method getEnvironmentBuilder.

/**
 * Override this method to customize the test environment.
 */
@Override
protected TestEnvironmentBuilder getEnvironmentBuilder() {
    final TestEnvironmentBuilder builder = TestEnvironment.builder().all().es5().kafka();
    builder.withOpenNMSEnvironment().addFile(AbstractSyslogTestCase.class.getResource("/org.apache.karaf.features.cfg"), "etc/org.apache.karaf.features.cfg").addFile(AbstractSyslogTestCase.class.getResource("/log4j2-info.xml"), "etc/log4j2.xml").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("/service-configuration-disable-alarmd.xml"), "etc/service-configuration.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").addFile(AbstractSyslogTestCase.class.getResource("/opennms.properties.d/sink-initial-sleep-time.properties"), "etc/opennms.properties.d/sink-initial-sleep-time.properties").addFile(AbstractSyslogTestCase.class.getResource("/opennms.properties.d/kafka-sink.properties"), "etc/opennms.properties.d/kafka-sink.properties");
    builder.withMinionEnvironment().addFile(AbstractSyslogTestCase.class.getResource("/featuresBoot.d/kafka.boot"), "etc/featuresBoot.d/kafka.boot");
    OpenNMSSeleniumTestCase.configureTestEnvironment(builder);
    return builder;
}
Also used : TestEnvironmentBuilder(org.opennms.test.system.api.TestEnvironmentBuilder)

Example 7 with TestEnvironmentBuilder

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

the class AlarmElasticsearch5IT method getTestEnvironment.

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

Example 8 with TestEnvironmentBuilder

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

the class AbstractSyslogTestCase method getEnvironmentBuilder.

/**
 * Override this method to customize the test environment.
 */
protected TestEnvironmentBuilder getEnvironmentBuilder() {
    final TestEnvironmentBuilder builder = TestEnvironment.builder().all().kafka();
    builder.withOpenNMSEnvironment().addFile(AbstractSyslogTestCase.class.getResource("/log4j2-info.xml"), "etc/log4j2.xml").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("/service-configuration-disable-alarmd.xml"), "etc/service-configuration.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").addFile(AbstractSyslogTestCase.class.getResource("/opennms.properties.d/kafka-sink.properties"), "etc/opennms.properties.d/kafka-sink.properties");
    builder.withMinionEnvironment().addFile(AbstractSyslogTestCase.class.getResource("/featuresBoot.d/kafka.boot"), "etc/featuresBoot.d/kafka.boot");
    OpenNMSSeleniumTestCase.configureTestEnvironment(builder);
    return builder;
}
Also used : TestEnvironmentBuilder(org.opennms.test.system.api.TestEnvironmentBuilder)

Example 9 with TestEnvironmentBuilder

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

the class JtiTelemetryIT method getTestEnvironment.

@ClassRule
public static final TestEnvironment getTestEnvironment() {
    if (!OpenNMSSeleniumTestCase.isDockerEnabled()) {
        return new NullTestEnvironment();
    }
    try {
        final TestEnvironmentBuilder builder = TestEnvironment.builder().all();
        builder.withOpenNMSEnvironment().addFile(JtiTelemetryIT.class.getResource("/telemetry/jti-telemetryd-configuration.xml"), "etc/telemetryd-configuration.xml");
        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 10 with TestEnvironmentBuilder

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

the class MinionHeartbeatOutageIT method getEnvironmentBuilder.

/**
 * Override this method to customize the test environment.
 */
protected TestEnvironmentBuilder getEnvironmentBuilder() {
    final TestEnvironmentBuilder builder = TestEnvironment.builder().all();
    OpenNMSSeleniumTestCase.configureTestEnvironment(builder);
    return builder;
}
Also used : TestEnvironmentBuilder(org.opennms.test.system.api.TestEnvironmentBuilder)

Aggregations

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