mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-09 06:25:07 +00:00
This change converts the module and plugin parameters for testClusters to be lazy. Meaning that the values are not resolved until they are actually used. This removes the requirement to use project.afterEvaluate to be able to resolve the bundle artifact. Note - this does not completely remove the need for afterEvaluate since it is still needed for the custom resource extension.
32 lines
868 B
Groovy
32 lines
868 B
Groovy
import org.elasticsearch.gradle.MavenFilteringHack
|
|
|
|
apply plugin: 'elasticsearch.testclusters'
|
|
apply plugin: 'elasticsearch.standalone-rest-test'
|
|
apply plugin: 'elasticsearch.rest-test'
|
|
|
|
dependencies {
|
|
testCompile project(':x-pack:qa')
|
|
}
|
|
|
|
int pluginsCount = 0
|
|
testClusters.integTest {
|
|
testDistribution = 'DEFAULT'
|
|
setting 'xpack.security.enabled', 'true'
|
|
setting 'xpack.license.self_generated.type', 'trial'
|
|
user username: "test_user", password: "x-pack-test-password"
|
|
project(':plugins').getChildProjects().each { pluginName, pluginProject ->
|
|
plugin pluginProject.tasks.bundlePlugin.archiveFile
|
|
tasks.integTest.dependsOn pluginProject.tasks.bundlePlugin
|
|
pluginsCount += 1
|
|
}
|
|
}
|
|
|
|
ext.expansions = [
|
|
'expected.plugins.count': pluginsCount
|
|
]
|
|
|
|
processTestResources {
|
|
inputs.properties(expansions)
|
|
MavenFilteringHack.filter(it, expansions)
|
|
}
|