Package org.opennms.smoketest.containers
Class MinionContainer
- java.lang.Object
-
- org.testcontainers.containers.FailureDetectingExternalResource
-
- org.testcontainers.containers.GenericContainer
-
- org.opennms.smoketest.containers.MinionContainer
-
- All Implemented Interfaces:
AutoCloseable
,org.junit.rules.TestRule
,KarafContainer
,org.testcontainers.containers.Container
,org.testcontainers.containers.ContainerState
,org.testcontainers.containers.traits.LinkableContainer
,org.testcontainers.containers.wait.strategy.WaitStrategyTarget
,org.testcontainers.lifecycle.Startable
,org.testcontainers.lifecycle.TestLifecycleAware
public class MinionContainer extends org.testcontainers.containers.GenericContainer implements KarafContainer, org.testcontainers.lifecycle.TestLifecycleAware
-
-
Constructor Summary
Constructors Constructor Description MinionContainer(StackModel model, Map<String,String> configuration)
MinionContainer(StackModel model, MinionProfile profile)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterTest(org.testcontainers.lifecycle.TestDescription description, Optional<Throwable> throwable)
String
getId()
String
getLocation()
InetSocketAddress
getNetworkProtocolAddress(NetworkProtocol protocol)
InetSocketAddress
getSshAddress()
InetSocketAddress
getSyslogAddress()
int
getWebPort()
URL
getWebUrl()
SshClient
ssh()
Create a new SSH client connected to the Karaf shell in this container.-
Methods inherited from class org.testcontainers.containers.GenericContainer
addEnv, addExposedPort, addExposedPorts, addFileSystemBind, addFixedExposedPort, addFixedExposedPort, addLink, apply, canBeReused, configure, containerIsCreated, containerIsStarted, containerIsStarted, containerIsStarting, containerIsStarting, containerIsStopped, containerIsStopping, copyFileFromContainer, createVolumeDirectory, dependsOn, dependsOn, dependsOn, doStart, equals, failed, finished, getBinds, getCommandParts, getContainerId, getContainerInfo, getContainerName, getCopyToFileContainerPathMap, getCreateContainerCmdModifiers, getDependencies, getDockerClient, getDockerImageName, getEnv, getEnvMap, getExposedPorts, getExtraHosts, getImage, getIpAddress, getLabels, getLinkedContainers, getLivenessCheckPort, getLivenessCheckPortNumbers, getLivenessCheckPorts, getLogConsumers, getNetwork, getNetworkAliases, getNetworkMode, getPortBindings, getShmSize, getStartupAttempts, getStartupCheckStrategy, getTestHostIpAddress, getTmpFsMapping, getVolumesFroms, getWaitStrategy, getWorkingDirectory, hashCode, isPrivilegedMode, isShouldBeReused, logger, setBinds, setCommand, setCommand, setCommandParts, setCopyToFileContainerPathMap, setDockerImageName, setEnv, setExposedPorts, setExtraHosts, setImage, setLabels, setLinkedContainers, setLogConsumers, setNetwork, setNetworkAliases, setNetworkMode, setPortBindings, setPrivilegedMode, setShmSize, setStartupAttempts, setStartupCheckStrategy, setTmpFsMapping, setVolumesFroms, setWaitStrategy, setWorkingDirectory, start, starting, stop, succeeded, toString, waitingFor, waitUntilContainerStarted, withClasspathResourceMapping, withClasspathResourceMapping, withCommand, withCommand, withCopyFileToContainer, withCreateContainerCmdModifier, withEnv, withEnv, withExposedPorts, withExtraHost, withFileSystemBind, withImagePullPolicy, withLabel, withLabels, withLogConsumer, withMinimumRunningDuration, withNetwork, withNetworkAliases, withNetworkMode, withPrivilegedMode, withReuse, withSharedMemorySize, withStartupAttempts, withStartupCheckStrategy, withStartupTimeout, withTmpFs, withVolumesFrom, withWorkingDirectory
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.testcontainers.containers.Container
addEnv, addExposedPort, addExposedPorts, addFileSystemBind, addFileSystemBind, addLink, followOutput, followOutput, getBinds, getCommandParts, getDockerClient, getDockerImageName, getEnv, getEnvMap, getExtraHosts, getImage, getLinkedContainers, getPortBindings, getTestHostIpAddress, self, setBinds, setCommand, setCommand, setCommandParts, setDockerImageName, setEnv, setExposedPorts, setExtraHosts, setImage, setLinkedContainers, setPortBindings, setWaitStrategy, waitingFor, withClasspathResourceMapping, withClasspathResourceMapping, withCommand, withCommand, withCopyFileToContainer, withEnv, withEnv, withEnv, withExposedPorts, withExtraHost, withFileSystemBind, withFileSystemBind, withImagePullPolicy, withLabel, withLabels, withLogConsumer, withMinimumRunningDuration, withNetwork, withNetworkAliases, withNetworkMode, withPrivilegedMode, withStartupCheckStrategy, withStartupTimeout, withVolumesFrom, withWorkingDirectory
-
Methods inherited from interface org.testcontainers.containers.ContainerState
copyFileFromContainer, copyFileFromContainer, copyFileToContainer, copyFileToContainer, execInContainer, execInContainer, getBoundPortNumbers, getContainerId, getContainerInfo, getContainerIpAddress, getCurrentContainerInfo, getExposedPorts, getFirstMappedPort, getHost, getLogs, getLogs, getMappedPort, isCreated, isHealthy, isRunning
-
-
-
-
Constructor Detail
-
MinionContainer
public MinionContainer(StackModel model, MinionProfile profile)
-
MinionContainer
public MinionContainer(StackModel model, Map<String,String> configuration)
-
-
Method Detail
-
getSyslogAddress
public InetSocketAddress getSyslogAddress()
-
getSshAddress
public InetSocketAddress getSshAddress()
-
ssh
public SshClient ssh()
Description copied from interface:KarafContainer
Create a new SSH client connected to the Karaf shell in this container.- Specified by:
ssh
in interfaceKarafContainer
- Returns:
- a new SSH client for this container
-
getWebUrl
public URL getWebUrl()
-
getWebPort
public int getWebPort()
-
getLocation
public String getLocation()
-
getNetworkProtocolAddress
public InetSocketAddress getNetworkProtocolAddress(NetworkProtocol protocol)
-
afterTest
public void afterTest(org.testcontainers.lifecycle.TestDescription description, Optional<Throwable> throwable)
- Specified by:
afterTest
in interfaceorg.testcontainers.lifecycle.TestLifecycleAware
-
getId
public String getId()
-
-