Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using matching docker container server version in unit tests #904

Merged
merged 7 commits into from
Nov 14, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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");
l-trotta marked this conversation as resolved.
Show resolved Hide resolved

// 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
Loading