60 lines
1.8 KiB
Groovy
60 lines
1.8 KiB
Groovy
import org.elasticsearch.gradle.test.RestIntegTestTask
|
|
|
|
apply plugin: 'elasticsearch.testclusters'
|
|
apply plugin: 'elasticsearch.standalone-test'
|
|
apply plugin: 'elasticsearch.rest-resources'
|
|
|
|
dependencies {
|
|
testImplementation project(':x-pack:qa')
|
|
}
|
|
|
|
restResources {
|
|
restApi {
|
|
includeXpack 'security', 'async_search', 'indices', 'open_point_in_time', 'close_point_in_time'
|
|
}
|
|
}
|
|
|
|
task 'remote-cluster'(type: RestIntegTestTask) {
|
|
mustRunAfter(precommit)
|
|
systemProperty 'tests.rest.suite', 'remote_cluster'
|
|
}
|
|
|
|
testClusters.'remote-cluster' {
|
|
testDistribution = 'DEFAULT'
|
|
numberOfNodes = 2
|
|
setting 'node.roles', '[data,ingest,master]'
|
|
setting 'xpack.security.enabled', 'true'
|
|
setting 'xpack.watcher.enabled', 'false'
|
|
setting 'xpack.ml.enabled', 'false'
|
|
setting 'xpack.license.self_generated.type', 'trial'
|
|
|
|
user username: "test_user", password: "x-pack-test-password"
|
|
}
|
|
|
|
task 'mixed-cluster'(type: RestIntegTestTask) {
|
|
dependsOn 'remote-cluster'
|
|
useCluster testClusters.'remote-cluster'
|
|
systemProperty 'tests.rest.suite', 'multi_cluster'
|
|
}
|
|
|
|
testClusters.'mixed-cluster' {
|
|
testDistribution = 'DEFAULT'
|
|
setting 'xpack.security.enabled', 'true'
|
|
setting 'xpack.watcher.enabled', 'false'
|
|
setting 'xpack.ml.enabled', 'false'
|
|
setting 'xpack.license.self_generated.type', 'trial'
|
|
setting 'cluster.remote.my_remote_cluster.seeds', {
|
|
testClusters.'remote-cluster'.getAllTransportPortURI().collect { "\"$it\"" }.toString()
|
|
}
|
|
setting 'cluster.remote.connections_per_cluster', "1"
|
|
|
|
user username: "test_user", password: "x-pack-test-password"
|
|
}
|
|
|
|
tasks.register("integTest") {
|
|
dependsOn 'mixed-cluster'
|
|
}
|
|
|
|
tasks.named("test").configure { enabled = false } // no unit tests for multi-cluster-search, only the rest integration test
|
|
tasks.named("check").configure { dependsOn("integTest") }
|