Search in sources :

Example 11 with TestEnvironmentBuilder

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

the class MinionHeartbeatOutageKafkaIT method getEnvironmentBuilder.

/**
 * Override this method to customize the test environment.
 */
@Override
protected TestEnvironmentBuilder getEnvironmentBuilder() {
    final TestEnvironmentBuilder builder = TestEnvironment.builder().all().kafka();
    builder.withOpenNMSEnvironment().addFile(MinionHeartbeatOutageKafkaIT.class.getResource("/opennms.properties.d/kafka-sink.properties"), "etc/opennms.properties.d/kafka-sink.properties");
    builder.withMinionEnvironment().addFile(MinionHeartbeatOutageKafkaIT.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 12 with TestEnvironmentBuilder

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

the class NxosTelemetryIT 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/nxos-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 13 with TestEnvironmentBuilder

use of org.opennms.test.system.api.TestEnvironmentBuilder 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)

Example 14 with TestEnvironmentBuilder

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

the class MonitorsListCommandIT 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 15 with TestEnvironmentBuilder

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

the class DetectorsCommandIT 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