67 lines
2.4 KiB
Groovy
67 lines
2.4 KiB
Groovy
import org.elasticsearch.gradle.test.RestIntegTestTask
|
|
|
|
apply plugin: 'elasticsearch.testclusters'
|
|
apply plugin: 'elasticsearch.standalone-test'
|
|
|
|
dependencies {
|
|
testCompile project(':x-pack:plugin:ccr:qa')
|
|
testCompile project(':x-pack:plugin:core')
|
|
testCompile project(':x-pack:plugin:ilm')
|
|
}
|
|
|
|
File repoDir = file("$buildDir/testclusters/repo")
|
|
|
|
task 'leader-cluster'(type: RestIntegTestTask) {
|
|
mustRunAfter(precommit)
|
|
runner {
|
|
systemProperty 'tests.target_cluster', 'leader'
|
|
/* To support taking index snapshots, we have to set path.repo setting */
|
|
systemProperty 'tests.path.repo', repoDir.absolutePath
|
|
}
|
|
}
|
|
|
|
testClusters.'leader-cluster' {
|
|
testDistribution = 'DEFAULT'
|
|
setting 'path.repo', repoDir.absolutePath
|
|
setting 'xpack.ilm.enabled', 'true'
|
|
setting 'xpack.ccr.enabled', 'true'
|
|
setting 'xpack.security.enabled', 'false'
|
|
setting 'xpack.watcher.enabled', 'false'
|
|
setting 'xpack.monitoring.enabled', 'false'
|
|
setting 'xpack.ml.enabled', 'false'
|
|
setting 'xpack.license.self_generated.type', 'trial'
|
|
setting 'indices.lifecycle.poll_interval', '1000ms'
|
|
}
|
|
|
|
task 'follow-cluster'(type: RestIntegTestTask) {
|
|
dependsOn 'leader-cluster'
|
|
runner {
|
|
useCluster testClusters.'leader-cluster'
|
|
systemProperty 'tests.target_cluster', 'follow'
|
|
nonInputProperties.systemProperty 'tests.leader_host',
|
|
"${-> testClusters."leader-cluster".getAllHttpSocketURI().get(0)}"
|
|
nonInputProperties.systemProperty 'tests.leader_remote_cluster_seed',
|
|
"${-> testClusters.'leader-cluster'.getAllTransportPortURI().get(0)}"
|
|
/* To support taking index snapshots, we have to set path.repo setting */
|
|
systemProperty 'tests.path.repo', repoDir.absolutePath
|
|
}
|
|
}
|
|
|
|
testClusters.'follow-cluster' {
|
|
testDistribution = 'DEFAULT'
|
|
setting 'path.repo', repoDir.absolutePath
|
|
setting 'xpack.ilm.enabled', 'true'
|
|
setting 'xpack.ccr.enabled', 'true'
|
|
setting 'xpack.security.enabled', 'false'
|
|
setting 'xpack.watcher.enabled', 'false'
|
|
setting 'xpack.monitoring.enabled', 'false'
|
|
setting 'xpack.ml.enabled', 'false'
|
|
setting 'xpack.license.self_generated.type', 'trial'
|
|
setting 'indices.lifecycle.poll_interval', '1000ms'
|
|
setting 'cluster.remote.leader_cluster.seeds',
|
|
{ "\"${testClusters.'leader-cluster'.getAllTransportPortURI().get(0)}\"" }
|
|
}
|
|
|
|
check.dependsOn 'follow-cluster'
|
|
test.enabled = false // no unit tests for this module, only the rest integration test
|