Skip to content

Commit

Permalink
BWC testing: remove hardcoded OpenSearch version
Browse files Browse the repository at this point in the history
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 <lukas.vlcek@aiven.io>
  • Loading branch information
lukas-vlcek committed Jan 3, 2025
1 parent 8efef9a commit 481906a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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<RegularFile>() {
@Override
Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 481906a

Please sign in to comment.