2018-04-13 13:11:28 -04:00
|
|
|
import org.elasticsearch.gradle.test.RestIntegTestTask
|
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
task leaderClusterTest(type: RestIntegTestTask) {
|
|
|
|
mustRunAfter(precommit)
|
|
|
|
}
|
|
|
|
|
|
|
|
leaderClusterTestCluster {
|
|
|
|
numNodes = 1
|
|
|
|
clusterName = 'leader-cluster'
|
2018-08-20 23:33:18 -04:00
|
|
|
setting 'xpack.license.self_generated.type', 'trial'
|
2018-12-09 13:34:48 -05:00
|
|
|
setting 'node.name', 'leader'
|
2018-04-13 13:11:28 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
leaderClusterTestRunner {
|
2018-10-23 17:24:32 -04:00
|
|
|
systemProperty 'tests.target_cluster', 'leader'
|
2018-04-13 13:11:28 -04:00
|
|
|
}
|
|
|
|
|
2018-12-09 13:34:48 -05:00
|
|
|
task middleClusterTest(type: RestIntegTestTask) {}
|
|
|
|
|
|
|
|
middleClusterTestCluster {
|
|
|
|
dependsOn leaderClusterTestRunner
|
|
|
|
numNodes = 1
|
|
|
|
clusterName = 'middle-cluster'
|
|
|
|
setting 'xpack.license.self_generated.type', 'trial'
|
|
|
|
setting 'cluster.remote.leader_cluster.seeds', "\"${-> leaderClusterTest.nodes.get(0).transportUri()}\""
|
|
|
|
setting 'node.name', 'middle'
|
|
|
|
}
|
|
|
|
|
|
|
|
middleClusterTestRunner {
|
|
|
|
systemProperty 'tests.target_cluster', 'middle'
|
|
|
|
systemProperty 'tests.leader_host', "${-> leaderClusterTest.nodes.get(0).httpUri()}"
|
|
|
|
}
|
|
|
|
|
2018-04-13 13:11:28 -04:00
|
|
|
task followClusterTest(type: RestIntegTestTask) {}
|
|
|
|
|
|
|
|
followClusterTestCluster {
|
2018-12-09 13:34:48 -05:00
|
|
|
dependsOn middleClusterTestRunner
|
2018-04-13 13:11:28 -04:00
|
|
|
numNodes = 1
|
|
|
|
clusterName = 'follow-cluster'
|
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'
|
2018-09-05 20:43:44 -04:00
|
|
|
setting 'cluster.remote.leader_cluster.seeds', "\"${-> leaderClusterTest.nodes.get(0).transportUri()}\""
|
2018-12-09 13:34:48 -05:00
|
|
|
setting 'cluster.remote.middle_cluster.seeds', "\"${-> middleClusterTest.nodes.get(0).transportUri()}\""
|
|
|
|
setting 'node.name', 'follow'
|
2018-04-13 13:11:28 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
followClusterTestRunner {
|
2018-10-23 17:24:32 -04:00
|
|
|
systemProperty 'tests.target_cluster', 'follow'
|
2018-04-13 13:11:28 -04:00
|
|
|
systemProperty 'tests.leader_host', "${-> leaderClusterTest.nodes.get(0).httpUri()}"
|
2018-12-09 13:34:48 -05:00
|
|
|
systemProperty 'tests.middle_host', "${-> middleClusterTest.nodes.get(0).httpUri()}"
|
2018-04-13 13:11:28 -04:00
|
|
|
finalizedBy 'leaderClusterTestCluster#stop'
|
2018-12-09 13:34:48 -05:00
|
|
|
finalizedBy 'middleClusterTestCluster#stop'
|
2018-04-13 13:11:28 -04:00
|
|
|
}
|
|
|
|
|
2018-08-24 09:48:54 -04:00
|
|
|
check.dependsOn followClusterTest
|
2018-12-19 01:25:20 -05:00
|
|
|
unitTest.enabled = false // no unit tests for multi-cluster-search, only the rest integration test
|