Class MicrocksAsyncMinionContainer

java.lang.Object
org.testcontainers.containers.FailureDetectingExternalResource
org.testcontainers.containers.GenericContainer<MicrocksAsyncMinionContainer>
io.github.microcks.testcontainers.MicrocksAsyncMinionContainer
All Implemented Interfaces:
AutoCloseable, org.junit.rules.TestRule, org.testcontainers.containers.Container<MicrocksAsyncMinionContainer>, org.testcontainers.containers.ContainerState, org.testcontainers.containers.traits.LinkableContainer, org.testcontainers.containers.wait.strategy.WaitStrategyTarget, org.testcontainers.lifecycle.Startable

public class MicrocksAsyncMinionContainer extends org.testcontainers.containers.GenericContainer<MicrocksAsyncMinionContainer>
Testcontainers implementation for Async Minion container. Instances of this class are not meant to be created directly but through a MicrocksContainersEnsemble.
Author:
laurent
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.testcontainers.containers.Container

    org.testcontainers.containers.Container.ExecResult
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     

    Fields inherited from class org.testcontainers.containers.GenericContainer

    CONTAINER_RUNNING_TIMEOUT_SEC, dependencies, dockerClient, INTERNAL_HOST_HOSTNAME, waitStrategy

    Fields inherited from interface org.testcontainers.containers.ContainerState

    STATE_HEALTHY
  • Constructor Summary

    Constructors
    Constructor
    Description
    MicrocksAsyncMinionContainer(org.testcontainers.containers.Network network, String image, MicrocksContainer microcks)
    Build a new MicrocksAsyncMinionContainer with its container image name as string.
    MicrocksAsyncMinionContainer(org.testcontainers.containers.Network network, org.testcontainers.utility.DockerImageName imageName, MicrocksContainer microcks)
    Build a new MicrocksAsyncMinionContainer with its container image name as string.
    MicrocksAsyncMinionContainer(org.testcontainers.containers.Network network, org.testcontainers.utility.DockerImageName imageName, String microcksHost)
    Build a new MicrocksAsyncMinionContainer with its container image name as string.
  • Method Summary

    Modifier and Type
    Method
    Description
    getAmazonSNSMockTopic(String service, String version, String operationName)
    Get the exposed mock topic for an Amazon SNS Service.
    getAmazonSQSMockQueue(String service, String version, String operationName)
    Get the exposed mock queue for an Amazon SQS Service.
    Get the Http endpoint where Microcks can be accessed (you'd have to append '/api' to access APIs)
    getKafkaMockTopic(String service, String version, String operationName)
    Get the exposed mock topic for a Kafka Service.
    getWSMockEndpoint(String service, String version, String operationName)
    Get the exposed mock endpoints for a WebSocket Service.
    Connect the MicrocksAsyncMinionContainer to an Amazon SNS service to allow SNS messages mocking.
    Connect the MicrocksAsyncMinionContainer to an Amazon SQS service to allow SQS messages mocking.
    Connect the MicrocksAsyncMinionContainer to a Kafka server to allow Kafka messages mocking.

    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, isHostAccessible, isPrivilegedMode, isShouldBeReused, logger, setBinds, setCommand, setCommand, setCommandParts, setCopyToFileContainerPathMap, setDockerImageName, setEnv, setExposedPorts, setExtraHosts, setHostAccessible, setImage, setLabels, setLinkedContainers, setLogConsumers, setNetwork, setNetworkAliases, setNetworkMode, setPortBindings, setPrivilegedMode, setShmSize, setStartupAttempts, setStartupCheckStrategy, setTmpFsMapping, setVolumesFroms, setWaitStrategy, setWorkingDirectory, start, starting, stop, succeeded, toString, waitingFor, waitUntilContainerStarted, withAccessToHost, withClasspathResourceMapping, withClasspathResourceMapping, withCommand, withCommand, withCopyFileToContainer, withCopyToContainer, 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

    addFileSystemBind, followOutput, followOutput, self, withEnv, withFileSystemBind

    Methods inherited from interface org.testcontainers.containers.ContainerState

    copyFileFromContainer, copyFileToContainer, copyFileToContainer, execInContainer, execInContainer, execInContainerWithUser, execInContainerWithUser, getBoundPortNumbers, getContainerIpAddress, getCurrentContainerInfo, getFirstMappedPort, getHost, getLogs, getLogs, getMappedPort, isCreated, isHealthy, isRunning

    Methods inherited from interface org.testcontainers.lifecycle.Startable

    close
  • Field Details

    • MICROCKS_ASYNC_MINION_HTTP_PORT

      public static final int MICROCKS_ASYNC_MINION_HTTP_PORT
      See Also:
  • Constructor Details

    • MicrocksAsyncMinionContainer

      public MicrocksAsyncMinionContainer(org.testcontainers.containers.Network network, String image, MicrocksContainer microcks)
      Build a new MicrocksAsyncMinionContainer with its container image name as string. This image must be compatible with quay.io/microcks/microcks-uber-async-minion image.
      Parameters:
      network - The network to attach this container to.
      image - The name (with tag/version) of Microcks Async Minion Uber distribution to use.
      microcks - The microcks container this minion will be bound to.
    • MicrocksAsyncMinionContainer

      public MicrocksAsyncMinionContainer(org.testcontainers.containers.Network network, org.testcontainers.utility.DockerImageName imageName, MicrocksContainer microcks)
      Build a new MicrocksAsyncMinionContainer with its container image name as string. This image must be compatible with quay.io/microcks/microcks-uber-async-minion image.
      Parameters:
      network - The network to attach this container to.
      imageName - The name of Microcks Async Minion Uber distribution to use.
      microcks - The microcks container this minion will be bound to.
    • MicrocksAsyncMinionContainer

      public MicrocksAsyncMinionContainer(org.testcontainers.containers.Network network, org.testcontainers.utility.DockerImageName imageName, String microcksHost)
      Build a new MicrocksAsyncMinionContainer with its container image name as string. This image must be compatible with quay.io/microcks/microcks-uber-async-minion image.
      Parameters:
      network - The network to attach this container to.
      imageName - The name of Microcks Async Minion Uber distribution to use.
      microcksHost - The microcks container hostname this minion will be bound to.
  • Method Details

    • withKafkaConnection

      public MicrocksAsyncMinionContainer withKafkaConnection(KafkaConnection connection)
      Connect the MicrocksAsyncMinionContainer to a Kafka server to allow Kafka messages mocking.
      Parameters:
      connection - Connection details to a Kafka broker.
      Returns:
      self
    • withAmazonSQSConnection

      public MicrocksAsyncMinionContainer withAmazonSQSConnection(AmazonServiceConnection connection)
      Connect the MicrocksAsyncMinionContainer to an Amazon SQS service to allow SQS messages mocking.
      Parameters:
      connection - Connection details to an Amazon SQS service.
      Returns:
      self
    • withAmazonSNSConnection

      public MicrocksAsyncMinionContainer withAmazonSNSConnection(AmazonServiceConnection connection)
      Connect the MicrocksAsyncMinionContainer to an Amazon SNS service to allow SNS messages mocking.
      Parameters:
      connection - Connection details to an Amazon SNS service.
      Returns:
      self
    • getHttpEndpoint

      public String getHttpEndpoint()
      Get the Http endpoint where Microcks can be accessed (you'd have to append '/api' to access APIs)
      Returns:
      The Http endpoint for talking to container.
    • getWSMockEndpoint

      public String getWSMockEndpoint(String service, String version, String operationName)
      Get the exposed mock endpoints for a WebSocket Service.
      Parameters:
      service - The name of Service/API
      version - The version of Service/API
      operationName - The name of operation to get the endpoint for
      Returns:
      A usable endpoint to interact with Microcks mocks.
    • getKafkaMockTopic

      public String getKafkaMockTopic(String service, String version, String operationName)
      Get the exposed mock topic for a Kafka Service.
      Parameters:
      service - The name of Service/API
      version - The version of Service/API
      operationName - The name of operation to get the topic for
      Returns:
      A usable topic to interact with Microcks mocks.
    • getAmazonSQSMockQueue

      public String getAmazonSQSMockQueue(String service, String version, String operationName)
      Get the exposed mock queue for an Amazon SQS Service.
      Parameters:
      service - The name of Service/API
      version - The version of Service/API
      operationName - The name of operation to get the topic for
      Returns:
      A usable queue to interact with Microcks mocks.
    • getAmazonSNSMockTopic

      public String getAmazonSNSMockTopic(String service, String version, String operationName)
      Get the exposed mock topic for an Amazon SNS Service.
      Parameters:
      service - The name of Service/API
      version - The version of Service/API
      operationName - The name of operation to get the topic for
      Returns:
      A usable queue to interact with Microcks mocks.