50 lines
1.5 KiB
Groovy
50 lines
1.5 KiB
Groovy
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
* Side Public License, v 1.
|
|
*/
|
|
|
|
import org.elasticsearch.gradle.internal.test.RestIntegTestTask
|
|
|
|
apply plugin: 'elasticsearch.internal-testclusters'
|
|
apply plugin: 'elasticsearch.standalone-rest-test'
|
|
apply plugin: 'elasticsearch.rest-resources'
|
|
|
|
dependencies {
|
|
testImplementation project(":client:rest-high-level")
|
|
}
|
|
|
|
tasks.register('remote-cluster', RestIntegTestTask) {
|
|
mustRunAfter("precommit")
|
|
systemProperty 'tests.rest.suite', 'remote_cluster'
|
|
}
|
|
|
|
testClusters {
|
|
'remote-cluster' {
|
|
numberOfNodes = 2
|
|
setting 'node.roles', '[data,ingest,master]'
|
|
setting 'xpack.security.enabled', 'false'
|
|
}
|
|
}
|
|
|
|
tasks.register("mixedClusterTest", RestIntegTestTask) {
|
|
useCluster testClusters.'remote-cluster'
|
|
dependsOn 'remote-cluster'
|
|
systemProperty 'tests.rest.suite', 'multi_cluster'
|
|
}
|
|
|
|
testClusters.matching { it.name == "mixedClusterTest"}.configureEach {
|
|
setting 'cluster.remote.my_remote_cluster.seeds',
|
|
{ "\"${testClusters.'remote-cluster'.getAllTransportPortURI().get(0)}\"" }
|
|
setting 'cluster.remote.connections_per_cluster', '1'
|
|
setting 'xpack.security.enabled', 'false'
|
|
}
|
|
|
|
tasks.register("integTest") {
|
|
dependsOn "mixedClusterTest"
|
|
}
|
|
|
|
tasks.named("check").configure { dependsOn("integTest") }
|