2018-04-13 13:11:28 -04:00
|
|
|
import org.elasticsearch.gradle.test.RestIntegTestTask
|
|
|
|
|
2019-05-29 09:16:04 -04:00
|
|
|
apply plugin: 'elasticsearch.testclusters'
|
2018-04-13 13:11:28 -04:00
|
|
|
apply plugin: 'elasticsearch.standalone-test'
|
|
|
|
|
|
|
|
dependencies {
|
2018-08-24 01:51:26 -04:00
|
|
|
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
|
2018-04-13 13:11:28 -04:00
|
|
|
testCompile project(path: xpackModule('ccr'), configuration: 'runtime')
|
2018-10-23 17:24:32 -04:00
|
|
|
testCompile project(':x-pack:plugin:ccr:qa')
|
2018-04-13 13:11:28 -04:00
|
|
|
}
|
|
|
|
|
2019-05-29 09:16:04 -04:00
|
|
|
task "leader-cluster"(type: RestIntegTestTask) {
|
2018-04-13 13:11:28 -04:00
|
|
|
mustRunAfter(precommit)
|
2019-05-29 09:16:04 -04:00
|
|
|
runner {
|
|
|
|
systemProperty 'tests.target_cluster', 'leader'
|
|
|
|
}
|
2018-04-13 13:11:28 -04:00
|
|
|
}
|
|
|
|
|
2019-05-29 09:16:04 -04:00
|
|
|
testClusters."leader-cluster" {
|
|
|
|
distribution = "DEFAULT"
|
2018-08-20 23:33:18 -04:00
|
|
|
setting 'xpack.license.self_generated.type', 'trial'
|
2018-04-13 13:11:28 -04:00
|
|
|
}
|
|
|
|
|
2018-12-09 13:34:48 -05:00
|
|
|
|
2019-05-29 09:16:04 -04:00
|
|
|
task "middle-cluster"(type: RestIntegTestTask) {
|
|
|
|
dependsOn "leader-cluster"
|
|
|
|
useCluster testClusters."leader-cluster"
|
|
|
|
runner {
|
|
|
|
systemProperty 'tests.target_cluster', 'middle'
|
|
|
|
nonInputProperties.systemProperty 'tests.leader_host',
|
|
|
|
"${-> testClusters."leader-cluster".getAllHttpSocketURI().get(0)}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
testClusters."middle-cluster" {
|
|
|
|
distribution = "DEFAULT"
|
2018-12-09 13:34:48 -05:00
|
|
|
setting 'xpack.license.self_generated.type', 'trial'
|
2019-05-29 09:16:04 -04:00
|
|
|
setting 'cluster.remote.leader_cluster.seeds',
|
|
|
|
{ "\"${testClusters."leader-cluster".getAllTransportPortURI().join(",")}\"" }
|
2018-12-09 13:34:48 -05:00
|
|
|
}
|
|
|
|
|
2019-05-29 09:16:04 -04:00
|
|
|
task 'follow-cluster'(type: RestIntegTestTask) {
|
|
|
|
dependsOn "leader-cluster", "middle-cluster"
|
|
|
|
useCluster testClusters."leader-cluster"
|
|
|
|
useCluster testClusters."middle-cluster"
|
|
|
|
runner {
|
|
|
|
systemProperty 'tests.target_cluster', 'follow'
|
|
|
|
nonInputProperties.systemProperty 'tests.leader_host',
|
|
|
|
"${-> testClusters."leader-cluster".getAllHttpSocketURI().get(0)}"
|
|
|
|
nonInputProperties.systemProperty 'tests.middle_host',
|
|
|
|
"${-> testClusters."middle-cluster".getAllHttpSocketURI().get(0)}"
|
|
|
|
}
|
2018-12-09 13:34:48 -05:00
|
|
|
}
|
|
|
|
|
2019-05-29 09:16:04 -04:00
|
|
|
testClusters."follow-cluster" {
|
|
|
|
distribution = "DEFAULT"
|
2018-09-12 09:13:07 -04:00
|
|
|
setting 'xpack.monitoring.collection.enabled', 'true'
|
2018-08-20 23:33:18 -04:00
|
|
|
setting 'xpack.license.self_generated.type', 'trial'
|
2019-05-29 09:16:04 -04:00
|
|
|
setting 'cluster.remote.leader_cluster.seeds',
|
|
|
|
{ "\"${testClusters."leader-cluster".getAllTransportPortURI().join(",")}\""}
|
|
|
|
setting 'cluster.remote.middle_cluster.seeds',
|
|
|
|
{ "\"${testClusters."middle-cluster".getAllTransportPortURI().join(",")}\""}
|
2018-04-13 13:11:28 -04:00
|
|
|
}
|
|
|
|
|
2019-05-29 09:16:04 -04:00
|
|
|
check.dependsOn "follow-cluster"
|
2019-04-09 14:52:50 -04:00
|
|
|
test.enabled = false // no unit tests for multi-cluster-search, only the rest integration test
|