Package org.opennms.smoketest.stacks
Class OpenNMSStack
- java.lang.Object
-
- org.opennms.smoketest.stacks.OpenNMSStack
-
- All Implemented Interfaces:
org.junit.rules.TestRule
public final class OpenNMSStack extends Object implements org.junit.rules.TestRule
This is the highest level interface to a stack. A stack is composed of containers and profiles (i.e. settings) for these. We aim to make it easy to spawn a stack with all the necessary services attached and provide easy access to these services. Access can range from direct API access with proper interfaces or simple references to the sockets. Given aStackModel
this class will create the appropriate containers and chain their initialization in a way that allows the stack to come up cleanly.- Author:
- jwhite
-
-
Field Summary
Fields Modifier and Type Field Description static OpenNMSStack
ALEC
static OpenNMSStack
MINIMAL
static OpenNMSStack
MINIMAL_WITH_DEFAULT_LOCALHOST
static OpenNMSStack
MINION
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.junit.runners.model.Statement
apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)
ElasticsearchContainer
elastic()
org.testcontainers.containers.KafkaContainer
kafka()
MinionContainer
minion()
MinionContainer
minions(int index)
OpenNMSContainer
opennms()
PostgreSQLContainer
postgres()
SentinelContainer
sentinel()
SentinelContainer
sentinels(int index)
static OpenNMSStack
withModel(StackModel model)
-
-
-
Field Detail
-
MINIMAL
public static final OpenNMSStack MINIMAL
-
MINIMAL_WITH_DEFAULT_LOCALHOST
public static final OpenNMSStack MINIMAL_WITH_DEFAULT_LOCALHOST
-
MINION
public static final OpenNMSStack MINION
-
ALEC
public static final OpenNMSStack ALEC
-
-
Method Detail
-
withModel
public static OpenNMSStack withModel(StackModel model)
-
opennms
public OpenNMSContainer opennms()
-
minion
public MinionContainer minion()
-
minions
public MinionContainer minions(int index)
-
sentinel
public SentinelContainer sentinel()
-
sentinels
public SentinelContainer sentinels(int index)
-
elastic
public ElasticsearchContainer elastic()
-
postgres
public PostgreSQLContainer postgres()
-
kafka
public org.testcontainers.containers.KafkaContainer kafka()
-
apply
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)
- Specified by:
apply
in interfaceorg.junit.rules.TestRule
-
-