2020-01-22 05:17:59 -05:00
|
|
|
import org.elasticsearch.gradle.test.RestIntegTestTask
|
|
|
|
|
|
|
|
apply plugin: 'elasticsearch.testclusters'
|
|
|
|
apply plugin: 'elasticsearch.standalone-test'
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
testCompile project(':x-pack:qa')
|
|
|
|
testCompile project(':client:rest-high-level')
|
|
|
|
}
|
|
|
|
|
2020-02-26 09:13:41 -05:00
|
|
|
restResources {
|
|
|
|
restApi {
|
|
|
|
includeXpack 'security', 'transform'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-01-22 05:17:59 -05:00
|
|
|
task 'remote-cluster'(type: RestIntegTestTask) {
|
|
|
|
mustRunAfter(precommit)
|
|
|
|
runner {
|
|
|
|
systemProperty 'tests.rest.suite', 'remote_cluster'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
testClusters.'remote-cluster' {
|
|
|
|
testDistribution = 'DEFAULT'
|
|
|
|
numberOfNodes = 2
|
2020-03-24 21:59:43 -04:00
|
|
|
setting 'node.remote_cluster_client', "false"
|
2020-01-22 05:17:59 -05:00
|
|
|
setting 'xpack.ilm.enabled', 'false'
|
|
|
|
setting 'xpack.security.enabled', 'true'
|
|
|
|
setting 'xpack.watcher.enabled', 'false'
|
|
|
|
setting 'xpack.monitoring.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'
|
|
|
|
runner {
|
|
|
|
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.monitoring.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"
|
2020-03-24 21:59:43 -04:00
|
|
|
setting 'node.remote_cluster_client', "true"
|
2020-01-22 05:17:59 -05:00
|
|
|
|
|
|
|
user username: "test_user", password: "x-pack-test-password"
|
|
|
|
}
|
|
|
|
|
|
|
|
task integTest {
|
|
|
|
dependsOn 'mixed-cluster'
|
|
|
|
}
|
|
|
|
|
|
|
|
test.enabled = false // no unit tests for multi-cluster-search, only the rest integration test
|
|
|
|
check.dependsOn(integTest)
|