2018-02-23 11:03:17 -05:00
|
|
|
|
|
|
|
import org.elasticsearch.gradle.test.RestIntegTestTask
|
2019-06-25 11:46:52 -04:00
|
|
|
import org.elasticsearch.gradle.testclusters.TestClustersPlugin
|
2018-02-23 11:03:17 -05:00
|
|
|
|
|
|
|
subprojects { Project subproj ->
|
|
|
|
subproj.tasks.withType(RestIntegTestTask) {
|
2019-06-25 11:46:52 -04:00
|
|
|
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 {
|
2019-07-15 20:53:05 -04:00
|
|
|
testClusters.all {
|
2019-10-04 09:12:53 -04:00
|
|
|
String configuredTestDistribution = System.getProperty('tests.distribution', 'oss').toUpperCase()
|
|
|
|
testDistribution = configuredTestDistribution
|
|
|
|
if (configuredTestDistribution.equals("DEFAULT")) {
|
|
|
|
setting "xpack.security.enabled", "false"
|
|
|
|
}
|
2018-02-23 11:03:17 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|