2017-01-04 14:27:53 -05:00
|
|
|
apply plugin: 'elasticsearch.standalone-rest-test'
|
2016-03-08 17:15:40 -05:00
|
|
|
apply plugin: 'elasticsearch.rest-test'
|
|
|
|
|
|
|
|
dependencies {
|
2017-02-10 14:02:42 -05:00
|
|
|
testCompile project(path: ':x-pack-elasticsearch:plugin', configuration: 'runtime')
|
|
|
|
testCompile project(path: ':x-pack-elasticsearch:plugin', configuration: 'testArtifacts')
|
2016-08-11 13:28:36 -04:00
|
|
|
testCompile project(path: ':modules:reindex')
|
2016-03-08 17:15:40 -05:00
|
|
|
}
|
|
|
|
|
2017-02-22 03:56:52 -05:00
|
|
|
integTestCluster {
|
|
|
|
setting 'script.inline', 'true'
|
|
|
|
plugin ':x-pack-elasticsearch:plugin'
|
|
|
|
// Whitelist reindexing from the local node so we can test it.
|
|
|
|
setting 'reindex.remote.whitelist', '127.0.0.1:*'
|
2017-03-02 12:01:05 -05:00
|
|
|
setting 'xpack.ml.enabled', 'false'
|
2017-02-22 03:56:52 -05:00
|
|
|
extraConfigFile 'x-pack/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/x-pack/users', 'useradd', user, '-p', 'changeme', '-r', role
|
|
|
|
}
|
|
|
|
waitCondition = { node, ant ->
|
|
|
|
File tmpFile = new File(node.cwd, 'wait.success')
|
|
|
|
ant.get(src: "http://${node.httpUri()}",
|
|
|
|
dest: tmpFile.toString(),
|
|
|
|
username: 'test_admin',
|
|
|
|
password: 'changeme',
|
|
|
|
ignoreerrors: true,
|
|
|
|
retries: 10)
|
|
|
|
return tmpFile.exists()
|
2016-03-08 17:15:40 -05:00
|
|
|
}
|
|
|
|
}
|