2018-10-16 06:21:28 -04:00
|
|
|
import org.elasticsearch.gradle.test.RestIntegTestTask
|
|
|
|
|
|
|
|
apply plugin: 'elasticsearch.standalone-test'
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
|
|
|
|
testCompile project(path: xpackModule('ccr'), configuration: 'runtime')
|
2018-10-23 17:24:32 -04:00
|
|
|
testCompile project(':x-pack:plugin:ccr:qa')
|
2018-10-16 06:21:28 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
task leaderClusterTest(type: RestIntegTestTask) {
|
|
|
|
mustRunAfter(precommit)
|
|
|
|
}
|
|
|
|
|
|
|
|
leaderClusterTestCluster {
|
|
|
|
numNodes = 1
|
|
|
|
clusterName = 'leader-cluster'
|
|
|
|
setting 'xpack.license.self_generated.type', 'trial'
|
|
|
|
setting 'node.name', 'leader'
|
|
|
|
}
|
|
|
|
|
|
|
|
leaderClusterTestRunner {
|
|
|
|
systemProperty 'tests.target_cluster', 'leader'
|
|
|
|
}
|
|
|
|
|
|
|
|
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()}"
|
|
|
|
}
|
|
|
|
|
|
|
|
task followClusterTest(type: RestIntegTestTask) {}
|
|
|
|
|
|
|
|
followClusterTestCluster {
|
|
|
|
dependsOn middleClusterTestRunner
|
|
|
|
numNodes = 1
|
|
|
|
clusterName = 'follow-cluster'
|
|
|
|
setting 'xpack.license.self_generated.type', 'trial'
|
|
|
|
setting 'cluster.remote.middle_cluster.seeds', "\"${-> middleClusterTest.nodes.get(0).transportUri()}\""
|
|
|
|
setting 'node.name', 'follow'
|
|
|
|
}
|
|
|
|
|
|
|
|
followClusterTestRunner {
|
|
|
|
systemProperty 'tests.target_cluster', 'follow'
|
|
|
|
systemProperty 'tests.leader_host', "${-> leaderClusterTest.nodes.get(0).httpUri()}"
|
|
|
|
systemProperty 'tests.middle_host', "${-> middleClusterTest.nodes.get(0).httpUri()}"
|
|
|
|
finalizedBy 'leaderClusterTestCluster#stop'
|
|
|
|
finalizedBy 'middleClusterTestCluster#stop'
|
|
|
|
}
|
|
|
|
|
|
|
|
check.dependsOn followClusterTest
|
|
|
|
test.enabled = false
|