2021-04-09 15:28:18 -04:00
|
|
|
/*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
|
|
|
* The OpenSearch Contributors require contributions made to
|
|
|
|
* this file be licensed under the Apache-2.0 license or a
|
|
|
|
* compatible open source license.
|
|
|
|
*
|
|
|
|
* Modifications Copyright OpenSearch Contributors. See
|
|
|
|
* GitHub history for details.
|
|
|
|
*/
|
|
|
|
|
2021-03-08 13:06:46 -05:00
|
|
|
import org.opensearch.gradle.test.RestIntegTestTask
|
|
|
|
import org.opensearch.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
|
2018-02-23 11:03:17 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|