Skip to content

Latest commit

 

History

History
52 lines (41 loc) · 2.22 KB

File metadata and controls

52 lines (41 loc) · 2.22 KB

embedded-opensearch

Maven dependency

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

Consumes (via bootstrap.properties)

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

  • embedded.opensearch.reuseContainer (true|false, default is false)

  • embedded.opensearch.dockerImage (default is 'opensearchproject/opensearch:2.18.0')

  • embedded.opensearch.indices (indices to create, no indices are created by default)

  • embedded.opensearch.waitTimeoutInSeconds (default is 60 seconds)

  • embedded.opensearch.credentialsEnabled (true|false, default is false). Enables start of opensearch with security plugin activated (HTTPS + basic auth).

  • embedded.opensearch.allowInsecure (true|false, default is false). Enables TrustAll policy for client methods (for init on startup and wait policies).

  • embedded.opensearch.username (username, default is "admin"). Login to be sent via basic authentication for client methods (for init on startup and wait policies).

  • embedded.opensearch.password (password, default is "admin"). Password to be sent via basic authentication for client methods (for init on startup and wait policies).

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

Produces

  • embedded.opensearch.clusterName

  • embedded.opensearch.host

  • embedded.opensearch.httpPort

  • embedded.opensearch.transportPort

  • embedded.opensearch.toxiproxy.host

  • embedded.opensearch.toxiproxy.port

  • embedded.opensearch.networkAlias

  • embedded.opensearch.internalHttpPort

  • embedded.opensearch.internalTransportPort

  • Bean ToxiproxyContainer.ContainerProxy opensearchContainerProxy

Example

To use autoconfigured opensearch client use this property in your test application.properties:

/src/test/resources/application.properties
opensearch.uris=http://${embedded.opensearch.host}:${embedded.opensearch.httpPort}