2017-04-03 03:53:48 -04:00
|
|
|
import org.elasticsearch.gradle.test.RestIntegTestTask
|
|
|
|
|
2019-07-01 03:38:56 -04:00
|
|
|
apply plugin: 'elasticsearch.testclusters'
|
2017-04-03 03:53:48 -04:00
|
|
|
apply plugin: 'elasticsearch.standalone-test'
|
|
|
|
|
|
|
|
dependencies {
|
2019-04-15 13:14:43 -04:00
|
|
|
testCompile project(':x-pack:qa')
|
2017-04-03 03:53:48 -04:00
|
|
|
}
|
|
|
|
|
2020-02-26 09:13:41 -05:00
|
|
|
restResources {
|
|
|
|
restApi {
|
|
|
|
includeXpack 'security'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-07-01 03:38:56 -04:00
|
|
|
task 'remote-cluster'(type: RestIntegTestTask) {
|
2017-04-03 03:53:48 -04:00
|
|
|
mustRunAfter(precommit)
|
2019-07-01 03:38:56 -04:00
|
|
|
runner {
|
|
|
|
systemProperty 'tests.rest.suite', 'remote_cluster'
|
|
|
|
}
|
2017-04-03 03:53:48 -04:00
|
|
|
}
|
|
|
|
|
2019-07-01 03:38:56 -04:00
|
|
|
testClusters.'remote-cluster' {
|
2019-07-15 20:53:05 -04:00
|
|
|
testDistribution = 'DEFAULT'
|
2019-07-01 03:38:56 -04:00
|
|
|
numberOfNodes = 2
|
2020-03-24 21:59:43 -04:00
|
|
|
setting 'node.remote_cluster_client', "false"
|
2018-03-21 23:09:44 -04:00
|
|
|
setting 'xpack.security.enabled', 'true'
|
2017-04-03 03:53:48 -04:00
|
|
|
setting 'xpack.watcher.enabled', 'false'
|
|
|
|
setting 'xpack.ml.enabled', 'false'
|
2018-02-12 14:57:04 -05:00
|
|
|
setting 'xpack.license.self_generated.type', 'trial'
|
2017-04-03 03:53:48 -04:00
|
|
|
|
2019-07-01 03:38:56 -04:00
|
|
|
user username: "test_user", password: "x-pack-test-password"
|
2019-06-24 05:13:38 -04:00
|
|
|
}
|
2017-04-03 03:53:48 -04:00
|
|
|
|
2019-07-01 03:38:56 -04:00
|
|
|
task 'mixed-cluster'(type: RestIntegTestTask) {
|
|
|
|
dependsOn 'remote-cluster'
|
|
|
|
runner {
|
|
|
|
useCluster testClusters.'remote-cluster'
|
|
|
|
systemProperty 'tests.rest.suite', 'multi_cluster'
|
|
|
|
}
|
|
|
|
}
|
2019-06-24 19:16:29 -04:00
|
|
|
|
2019-07-01 03:38:56 -04:00
|
|
|
testClusters.'mixed-cluster' {
|
2019-07-15 20:53:05 -04:00
|
|
|
testDistribution = 'DEFAULT'
|
2018-03-21 23:09:44 -04:00
|
|
|
setting 'xpack.security.enabled', 'true'
|
2017-04-03 03:53:48 -04:00
|
|
|
setting 'xpack.watcher.enabled', 'false'
|
|
|
|
setting 'xpack.ml.enabled', 'false'
|
2018-02-12 14:57:04 -05:00
|
|
|
setting 'xpack.license.self_generated.type', 'trial'
|
2019-07-01 03:38:56 -04:00
|
|
|
setting 'cluster.remote.my_remote_cluster.seeds', {
|
|
|
|
testClusters.'remote-cluster'.getAllTransportPortURI().collect { "\"$it\"" }.toString()
|
2017-04-03 03:53:48 -04:00
|
|
|
}
|
2019-07-01 03:38:56 -04:00
|
|
|
setting 'cluster.remote.connections_per_cluster', "1"
|
2020-03-24 21:59:43 -04:00
|
|
|
setting 'node.remote_cluster_client', "true"
|
2017-04-03 03:53:48 -04:00
|
|
|
|
2019-07-01 03:38:56 -04:00
|
|
|
user username: "test_user", password: "x-pack-test-password"
|
2017-04-03 03:53:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
task integTest {
|
2019-07-01 03:38:56 -04:00
|
|
|
dependsOn 'mixed-cluster'
|
2017-04-03 03:53:48 -04:00
|
|
|
}
|
|
|
|
|
2019-04-09 14:52:50 -04:00
|
|
|
test.enabled = false // no unit tests for multi-cluster-search, only the rest integration test
|
2017-04-03 03:53:48 -04:00
|
|
|
check.dependsOn(integTest)
|