12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- /*
- * 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.test.RestIntegTestTask
- apply plugin: 'elasticsearch.testclusters'
- apply plugin: 'elasticsearch.standalone-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]'
- }
- }
- 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'
- }
- tasks.register("integTest") {
- dependsOn "mixedClusterTest"
- }
- tasks.named("test").configure { enabled = false }// no unit tests for multi-cluster-search, only integration tests
- tasks.named("check").configure { dependsOn("integTest") }
|