How to configure elasticsearch testcontainers to use the latest ES

468 views Asked by At
testCompile "org.testcontainers:elasticsearch:1.14.3"

How to configure elasticsearch testcontainers to use the latest ES (say 7.9.2), the above is using a 6.4.1 image instead

1

There are 1 answers

0
P.J.Meisch On BEST ANSWER

at the place where you start the test container, just specify the desired image name:

ElasticsearchContainer elasticsearchContainer = 
  new ElasticsearchContainer("docker.elastic.co/elasticsearch/elasticsearch:7.9.2");
elasticsearchContainer.start();