Skip to content

Latest commit

 

History

History
47 lines (38 loc) · 1.34 KB

File metadata and controls

47 lines (38 loc) · 1.34 KB

embedded-consul

Maven dependency

pom.xml
<dependency>
    <groupId>com.playtika.testcontainers</groupId>
    <artifactId>embedded-consul</artifactId>
    <scope>test</scope>
</dependency>

Consumer (via bootstrap.properties)

  • embedded.consul.enabled (true|false, default is 'true')

  • embedded.consul.configurationFile (path for the consul configuration file to be mounted, relative to the resources folder, default is 'null')

  • embedded.consul.dockerImage (default is 'consul:1.15')

  • embedded.toxiproxy.proxies.consul.enabled Enables both creation of the container with ToxiProxy TCP proxy and a proxy to the embedded-consul container.

Example spring configuration:

application.yml
embedded:
  containers:
    enabled: true
  consul:
    enabled: true
    # file to be mounted in docker as '/consul/config/test-acl.hcl'
    # path relative from the resources directory (usually 'src/test/resources')
    configurationFile: consul/test-acl.hcl

Produces

  • embedded.consul.host

  • embedded.consul.port

  • embedded.consul.toxiproxy.host

  • embedded.consul.toxiproxy.port

  • embedded.consul.networkAlias

  • embedded.consul.internalPort

  • Bean ToxiproxyContainer.ContainerProxy consulContainerProxy