From 8a648aea13cc92c932c057aecbe795064266b8c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Vl=C4=8Dek?= Date: Fri, 3 Jan 2025 20:56:55 +0100 Subject: [PATCH] BWC testing: remove hardcoded OpenSearch version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In order to remove hardcoded version of actual OpenSearch from BWC versions array we need to introduce new 'empty' property and update it before testClusters are defined. Closes: #324 Signed-off-by: Lukáš Vlček --- build.gradle | 6 +++++- gradle.properties | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index b01731f..e94ca99 100644 --- a/build.gradle +++ b/build.gradle @@ -174,11 +174,15 @@ task copyZIPBundle { } } +// A hack. For some reason we can not reference 'ext' variables from testClusters, hence we define actual opensearch +// version the following way which seems to work fine for testClusters. See issue #324 +project.opensearch_version = ext.versions.opensearch + // Clusters for BWC tests 2.times { i -> testClusters { "${baseName}$i" { - versions = [project.BWCversion, "2.17.1"] + versions = [project.BWCversion, project.opensearch_version] numberOfNodes = 3 plugin(provider(new Callable() { @Override diff --git a/gradle.properties b/gradle.properties index ac4f89f..d1c8488 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,6 +3,9 @@ # An actual version of plugin version = 2.17.1.0 +# Leave this property empty, it is assigned during the gradle build execution (yes, it is a hack! see issue #324) +opensearch_version = + # A version of OpenSearch cluster to run BWC tests against BWCversion = 2.17.0