41 lines
1.2 KiB
Groovy
41 lines
1.2 KiB
Groovy
import org.elasticsearch.gradle.test.RestIntegTestTask
|
|
|
|
apply plugin: 'elasticsearch.standalone-test'
|
|
|
|
dependencies {
|
|
testCompile project(path: xpackModule('core'), configuration: 'runtime')
|
|
testCompile project(path: xpackModule('ccr'), configuration: 'runtime')
|
|
}
|
|
|
|
task leaderClusterTest(type: RestIntegTestTask) {
|
|
mustRunAfter(precommit)
|
|
}
|
|
|
|
leaderClusterTestCluster {
|
|
numNodes = 1
|
|
clusterName = 'leader-cluster'
|
|
plugin xpackProject('plugin').path
|
|
}
|
|
|
|
leaderClusterTestRunner {
|
|
systemProperty 'tests.is_leader_cluster', 'true'
|
|
}
|
|
|
|
task followClusterTest(type: RestIntegTestTask) {}
|
|
|
|
followClusterTestCluster {
|
|
dependsOn leaderClusterTestRunner
|
|
numNodes = 1
|
|
clusterName = 'follow-cluster'
|
|
plugin xpackProject('plugin').path
|
|
setting 'search.remote.leader_cluster.seeds', "\"${-> leaderClusterTest.nodes.get(0).transportUri()}\""
|
|
}
|
|
|
|
followClusterTestRunner {
|
|
systemProperty 'tests.is_leader_cluster', 'false'
|
|
systemProperty 'tests.leader_host', "${-> leaderClusterTest.nodes.get(0).httpUri()}"
|
|
finalizedBy 'leaderClusterTestCluster#stop'
|
|
}
|
|
|
|
test.enabled = false // no unit tests for multi-cluster-search, only the rest integration test
|