Skip to content

Commit

Permalink
unit test container version latest
Browse files Browse the repository at this point in the history
  • Loading branch information
l-trotta committed Nov 13, 2024
1 parent d451d9e commit 2e064f6
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,17 @@ public synchronized ElasticsearchTestServer start() {
return this;
}

Version version = Version.VERSION.major() < 8 ? new Version(7,17,5,false) : new Version(8,12,0,false);
// using latest snapshot version for generic tests
Version version = Version.VERSION.major() < 8 ? new Version(7, 17, 25, false) :
Version.parse(Version.VERSION.major() + "." + Version.VERSION.minor() + ".0-SNAPSHOT");

// Note we could use version.major() + "." + version.minor() + "-SNAPSHOT" but plugins won't install on a snapshot version
String esImage = "docker.elastic.co/elasticsearch/elasticsearch:" + version;
// using specific stable version for tests with plugins
if (plugins.length > 0) {
version = Version.VERSION.major() < 8 ? new Version(7, 17, 25, false) : new Version(8, 16, 0, false);
}

String esImage = "docker.elastic.co/elasticsearch/elasticsearch:" + version;

DockerImageName image;
if (plugins.length == 0) {
image = DockerImageName.parse(esImage);
Expand Down

0 comments on commit 2e064f6

Please sign in to comment.