2016-03-08 17:15:40 -05:00
|
|
|
apply plugin: 'elasticsearch.rest-test'
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
testCompile project(path: ':x-plugins:elasticsearch:x-pack', configuration: 'runtime')
|
|
|
|
}
|
|
|
|
|
|
|
|
integTest {
|
|
|
|
cluster {
|
2016-03-15 20:01:01 -04:00
|
|
|
setting 'script.inline', 'true'
|
2016-07-15 17:36:13 -04:00
|
|
|
plugin ':x-plugins:elasticsearch:x-pack'
|
2016-07-06 15:48:20 -04:00
|
|
|
// Whitelist reindexing from the local node so we can test it.
|
|
|
|
setting 'reindex.remote.whitelist', 'myself'
|
2016-03-30 03:07:57 -04:00
|
|
|
extraConfigFile 'x-pack/roles.yml', 'roles.yml'
|
2016-03-08 17:15:40 -05:00
|
|
|
[
|
2016-02-10 09:42:59 -05:00
|
|
|
test_admin: 'superuser',
|
|
|
|
powerful_user: 'superuser',
|
2016-03-08 17:15:40 -05:00
|
|
|
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,
|
2016-03-30 03:07:57 -04:00
|
|
|
'bin/x-pack/users', 'useradd', user, '-p', 'changeme', '-r', role
|
2016-03-08 17:15:40 -05:00
|
|
|
}
|
|
|
|
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()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|