62 lines
1.9 KiB
Groovy
62 lines
1.9 KiB
Groovy
import org.elasticsearch.gradle.test.RestIntegTestTask
|
|
|
|
apply plugin: 'elasticsearch.standalone-test'
|
|
|
|
dependencies {
|
|
testCompile project(':x-pack:plugin:ccr:qa')
|
|
}
|
|
|
|
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 followClusterTest(type: RestIntegTestTask) {}
|
|
|
|
followClusterTestCluster {
|
|
dependsOn leaderClusterTestRunner
|
|
numNodes = 1
|
|
clusterName = 'follow-cluster'
|
|
setting 'xpack.monitoring.collection.enabled', 'true'
|
|
setting 'xpack.license.self_generated.type', 'trial'
|
|
setting 'cluster.remote.leader_cluster.seeds', "\"${-> leaderClusterTest.nodes.get(0).transportUri()}\""
|
|
setting 'node.name', 'follow'
|
|
}
|
|
|
|
followClusterTestRunner {
|
|
systemProperty 'tests.target_cluster', 'follow'
|
|
systemProperty 'tests.leader_host', "${-> leaderClusterTest.nodes.get(0).httpUri()}"
|
|
}
|
|
|
|
task followClusterRestartTest(type: RestIntegTestTask) {}
|
|
|
|
followClusterRestartTestCluster {
|
|
dependsOn followClusterTestRunner
|
|
numNodes = 1
|
|
clusterName = 'follow-cluster'
|
|
dataDir = { nodeNumber -> followClusterTest.nodes[0].dataDir }
|
|
setting 'xpack.monitoring.collection.enabled', 'true'
|
|
setting 'xpack.license.self_generated.type', 'trial'
|
|
setting 'cluster.remote.leader_cluster.seeds', "\"${-> leaderClusterTest.nodes.get(0).transportUri()}\""
|
|
setting 'node.name', 'follow'
|
|
}
|
|
|
|
followClusterRestartTestRunner {
|
|
systemProperty 'tests.target_cluster', 'follow-restart'
|
|
systemProperty 'tests.leader_host', "${-> leaderClusterTest.nodes.get(0).httpUri()}"
|
|
finalizedBy 'leaderClusterTestCluster#stop'
|
|
}
|
|
|
|
check.dependsOn followClusterRestartTest
|
|
unitTest.enabled = false
|