2019-01-18 15:05:03 -05:00
|
|
|
import org.elasticsearch.gradle.test.RestIntegTestTask
|
|
|
|
|
2019-06-13 05:18:55 -04:00
|
|
|
apply plugin: 'elasticsearch.testclusters'
|
2019-01-18 15:05:03 -05:00
|
|
|
apply plugin: 'elasticsearch.standalone-test'
|
|
|
|
|
|
|
|
dependencies {
|
2019-11-14 06:01:23 -05:00
|
|
|
testCompile project(':x-pack:plugin:ccr:qa')
|
|
|
|
testCompile project(':x-pack:plugin:core')
|
|
|
|
testCompile project(':x-pack:plugin:ilm')
|
2019-01-18 15:05:03 -05:00
|
|
|
}
|
|
|
|
|
2019-06-13 05:18:55 -04:00
|
|
|
File repoDir = file("$buildDir/testclusters/repo")
|
|
|
|
|
|
|
|
task 'leader-cluster'(type: RestIntegTestTask) {
|
2019-11-14 06:01:23 -05:00
|
|
|
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
|
|
|
|
}
|
2019-01-18 15:05:03 -05:00
|
|
|
}
|
|
|
|
|
2019-06-13 05:18:55 -04:00
|
|
|
testClusters.'leader-cluster' {
|
2019-11-14 06:01:23 -05:00
|
|
|
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'
|
2019-01-18 15:05:03 -05:00
|
|
|
}
|
|
|
|
|
2019-06-13 05:18:55 -04:00
|
|
|
task 'follow-cluster'(type: RestIntegTestTask) {
|
2019-11-14 06:01:23 -05:00
|
|
|
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
|
|
|
|
}
|
2019-01-18 15:05:03 -05:00
|
|
|
}
|
|
|
|
|
2019-06-13 05:18:55 -04:00
|
|
|
testClusters.'follow-cluster' {
|
2019-11-14 06:01:23 -05:00
|
|
|
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)}\"" }
|
2019-01-18 15:05:03 -05:00
|
|
|
}
|
|
|
|
|
2019-06-13 05:18:55 -04:00
|
|
|
check.dependsOn 'follow-cluster'
|
2019-04-09 14:52:50 -04:00
|
|
|
test.enabled = false // no unit tests for this module, only the rest integration test
|