2018-05-16 01:48:32 -04:00
|
|
|
import org.elasticsearch.gradle.test.RestIntegTestTask
|
|
|
|
|
2019-05-29 09:16:04 -04:00
|
|
|
apply plugin: 'elasticsearch.testclusters'
|
2018-05-16 01:48:32 -04:00
|
|
|
apply plugin: 'elasticsearch.standalone-test'
|
|
|
|
|
|
|
|
dependencies {
|
2020-06-14 16:30:44 -04:00
|
|
|
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
2020-06-30 09:57:41 -04:00
|
|
|
testImplementation project(path: xpackModule('ccr'))
|
2020-06-14 16:30:44 -04:00
|
|
|
testImplementation project(':x-pack:plugin:ccr:qa')
|
2018-05-16 01:48:32 -04:00
|
|
|
}
|
|
|
|
|
2020-06-30 09:57:41 -04:00
|
|
|
task resolve {
|
|
|
|
doLast {
|
|
|
|
configurations.testCompileClasspath.files.each {
|
|
|
|
println it
|
|
|
|
}
|
|
|
|
println "configurations.testCompileClasspath.files " + configurations.testCompileClasspath.files.size()
|
|
|
|
}
|
|
|
|
}
|
2019-05-29 09:16:04 -04:00
|
|
|
task 'leader-cluster'(type: RestIntegTestTask) {
|
2019-11-14 06:01:23 -05:00
|
|
|
mustRunAfter(precommit)
|
|
|
|
runner {
|
|
|
|
systemProperty 'tests.target_cluster', 'leader'
|
|
|
|
}
|
2018-05-16 01:48:32 -04:00
|
|
|
}
|
|
|
|
|
2019-05-29 09:16:04 -04:00
|
|
|
testClusters.'leader-cluster' {
|
2019-11-14 06:01:23 -05:00
|
|
|
testDistribution = 'DEFAULT'
|
|
|
|
setting 'xpack.license.self_generated.type', 'trial'
|
|
|
|
setting 'xpack.security.enabled', 'true'
|
|
|
|
extraConfigFile 'roles.yml', file('leader-roles.yml')
|
|
|
|
user username: "test_admin", role: "superuser"
|
|
|
|
user username: "test_ccr", role: "ccruser"
|
2018-05-16 01:48:32 -04:00
|
|
|
}
|
|
|
|
|
2019-05-29 09:16:04 -04:00
|
|
|
task 'follow-cluster'(type: RestIntegTestTask) {
|
2019-11-14 06:01:23 -05:00
|
|
|
dependsOn 'leader-cluster'
|
|
|
|
runner {
|
|
|
|
useCluster testClusters.'leader-cluster'
|
|
|
|
systemProperty 'tests.target_cluster', 'follow'
|
|
|
|
nonInputProperties.systemProperty 'tests.leader_host', "${-> testClusters.'leader-cluster'.getAllHttpSocketURI().get(0)}"
|
|
|
|
}
|
2018-05-16 01:48:32 -04:00
|
|
|
}
|
|
|
|
|
2019-05-29 09:16:04 -04:00
|
|
|
testClusters.'follow-cluster' {
|
2019-11-14 06:01:23 -05:00
|
|
|
testDistribution = 'DEFAULT'
|
|
|
|
setting 'cluster.remote.leader_cluster.seeds', {
|
|
|
|
"\"${testClusters.'leader-cluster'.getAllTransportPortURI().join(",")}\""
|
|
|
|
}
|
|
|
|
setting 'xpack.license.self_generated.type', 'trial'
|
|
|
|
setting 'xpack.security.enabled', 'true'
|
|
|
|
setting 'xpack.monitoring.collection.enabled', 'true'
|
|
|
|
extraConfigFile 'roles.yml', file('follower-roles.yml')
|
|
|
|
user username: "test_admin", role: "superuser"
|
|
|
|
user username: "test_ccr", role: "ccruser"
|
2018-05-16 01:48:32 -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
|