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'
|
2020-07-06 15:16:26 -04:00
|
|
|
apply plugin: 'elasticsearch.rest-resources'
|
2017-04-03 03:53:48 -04:00
|
|
|
|
|
|
|
dependencies {
|
2020-06-14 16:30:44 -04:00
|
|
|
testImplementation project(':x-pack:qa')
|
2017-04-03 03:53:48 -04:00
|
|
|
}
|
|
|
|
|
2020-02-26 09:13:41 -05:00
|
|
|
restResources {
|
|
|
|
restApi {
|
2020-09-09 20:55:44 -04:00
|
|
|
includeXpack 'security', 'async_search', 'indices', 'open_point_in_time', 'close_point_in_time'
|
2020-02-26 09:13:41 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-07-01 03:38:56 -04:00
|
|
|
task 'remote-cluster'(type: RestIntegTestTask) {
|
2017-04-03 03:53:48 -04:00
|
|
|
mustRunAfter(precommit)
|
2020-08-04 08:46:32 -04:00
|
|
|
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
|
Introduce node.roles setting (#58512)
Today we have individual settings for configuring node roles such as
node.data and node.master. Additionally, roles are pluggable and we have
used this to introduce roles such as node.ml and node.voting_only. As
the number of roles is growing, managing these becomes harder for the
user. For example, to create a master-only node, today a user has to
configure:
- node.data: false
- node.ingest: false
- node.remote_cluster_client: false
- node.ml: false
at a minimum if they are relying on defaults, but also add:
- node.master: true
- node.transform: false
- node.voting_only: false
If they want to be explicit. This is also challenging in cases where a
user wants to have configure a coordinating-only node which requires
disabling all roles, a list which we are adding to, requiring the user
to keep checking whether a node has acquired any of these roles.
This commit addresses this by adding a list setting node.roles for which
a user has explicit control over the list of roles that a node has. If
the setting is configured, the node has exactly the roles in the list,
and not any additional roles. This means to configure a master-only
node, the setting is merely 'node.roles: [master]', and to configure a
coordinating-only node, the setting is merely: 'node.roles: []'.
With this change we deprecate the existing 'node.*' settings such as
'node.data'.
2020-06-25 14:14:51 -04:00
|
|
|
setting 'node.roles', '[data,ingest,master]'
|
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'
|
2020-08-04 08:46:32 -04:00
|
|
|
useCluster testClusters.'remote-cluster'
|
|
|
|
systemProperty 'tests.rest.suite', 'multi_cluster'
|
2019-07-01 03:38:56 -04:00
|
|
|
}
|
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"
|
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
|
|
|
}
|
|
|
|
|
2020-07-31 07:09:04 -04:00
|
|
|
tasks.register("integTest") {
|
2019-07-01 03:38:56 -04:00
|
|
|
dependsOn 'mixed-cluster'
|
2017-04-03 03:53:48 -04:00
|
|
|
}
|
|
|
|
|
2020-07-31 07:09:04 -04:00
|
|
|
tasks.named("test").configure { enabled = false } // no unit tests for multi-cluster-search, only the rest integration test
|
|
|
|
tasks.named("check").configure { dependsOn("integTest") }
|