OpenSearch/qa/build.gradle
Alpar Torok 2b16d7bcf8
Backport testclusters all (#47565)
* Bwc testclusters all (#46265)

Convert all bwc projects to testclusters

* Fix bwc versions config

* WIP fix rolling upgrade

* Fix bwc tests on old versions

* Fix rolling upgrade
2019-10-04 16:12:53 +03:00

23 lines
792 B
Groovy

import org.elasticsearch.gradle.test.RestIntegTestTask
import org.elasticsearch.gradle.testclusters.TestClustersPlugin
subprojects { Project subproj ->
subproj.tasks.withType(RestIntegTestTask) {
if (subproj.extensions.findByName("${it.name}Cluster")) {
subproj.extensions.configure("${it.name}Cluster") { cluster ->
cluster.distribution = System.getProperty('tests.distribution', 'oss')
}
}
}
plugins.withType(TestClustersPlugin).whenPluginAdded {
testClusters.all {
String configuredTestDistribution = System.getProperty('tests.distribution', 'oss').toUpperCase()
testDistribution = configuredTestDistribution
if (configuredTestDistribution.equals("DEFAULT")) {
setting "xpack.security.enabled", "false"
}
}
}
}