Testcontainers::ElasticsearchContainer
Inherits Testcontainers::DockerContainer < Reference < Object
ElasticsearchContainer provides a pre-configured container for Elasticsearch.
Example:
container = Testcontainers::ElasticsearchContainer.new
container.start
url = container.elasticsearch_url
# => "http://localhost:32768"
container.stop
container.remove
Constants
ES_DEFAULT_IMAGE = "elasticsearch:8.11.0"
ES_DEFAULT_PASSWORD = "test"
ES_DEFAULT_PORT = 9200
Constructors
Instance methods
password
Sourceport
Sourcestart
Starts the container.
This will:
- Pull the image if not present
- Create the container
- Start the container
- Execute the wait strategy (if any)
Returns self for method chaining.