mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-08 05:58:44 +00:00
This commit makes x-pack a module and adds it to the default distrubtion. It also creates distributions for zip, tar, deb and rpm which contain only oss code.
41 lines
1.5 KiB
Groovy
41 lines
1.5 KiB
Groovy
apply plugin: 'elasticsearch.standalone-rest-test'
|
|
apply plugin: 'elasticsearch.rest-test'
|
|
|
|
dependencies {
|
|
testCompile project(path: xpackModule('core'), configuration: 'runtime')
|
|
testCompile project(path: xpackModule('security'), configuration: 'testArtifacts')
|
|
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
|
|
testCompile project(path: ':modules:reindex')
|
|
}
|
|
|
|
integTestCluster {
|
|
// Whitelist reindexing from the local node so we can test it.
|
|
setting 'reindex.remote.whitelist', '127.0.0.1:*'
|
|
setting 'xpack.security.enabled', 'true'
|
|
setting 'xpack.ml.enabled', 'false'
|
|
setting 'xpack.license.self_generated.type', 'trial'
|
|
extraConfigFile 'roles.yml', 'roles.yml'
|
|
[
|
|
test_admin: 'superuser',
|
|
powerful_user: 'superuser',
|
|
minimal_user: 'minimal',
|
|
readonly_user: 'readonly',
|
|
dest_only_user: 'dest_only',
|
|
can_not_see_hidden_docs_user: 'can_not_see_hidden_docs',
|
|
can_not_see_hidden_fields_user: 'can_not_see_hidden_fields',
|
|
].each { String user, String role ->
|
|
setupCommand 'setupUser#' + user,
|
|
'bin/users', 'useradd', user, '-p', 'x-pack-test-password', '-r', role
|
|
}
|
|
waitCondition = { node, ant ->
|
|
File tmpFile = new File(node.cwd, 'wait.success')
|
|
ant.get(src: "http://${node.httpUri()}/_cluster/health?wait_for_nodes=>=${numNodes}&wait_for_status=yellow",
|
|
dest: tmpFile.toString(),
|
|
username: 'test_admin',
|
|
password: 'x-pack-test-password',
|
|
ignoreerrors: true,
|
|
retries: 10)
|
|
return tmpFile.exists()
|
|
}
|
|
}
|