2017-01-03 15:43:22 -05:00
|
|
|
apply plugin: 'elasticsearch.standalone-test'
|
2015-11-24 18:49:15 -05:00
|
|
|
apply plugin: 'elasticsearch.rest-test'
|
|
|
|
|
|
|
|
dependencies {
|
2016-12-14 18:02:28 -05:00
|
|
|
testCompile project(path: ':x-pack:elasticsearch', configuration: 'runtime')
|
2015-11-24 18:49:15 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// bring in watcher rest test suite
|
|
|
|
task copyWatcherRestTests(type: Copy) {
|
|
|
|
into project.sourceSets.test.output.resourcesDir
|
2016-12-14 18:02:28 -05:00
|
|
|
from project(':x-pack:elasticsearch').sourceSets.test.resources.srcDirs
|
2015-12-01 09:57:01 -05:00
|
|
|
include 'rest-api-spec/test/watcher/**'
|
2015-11-24 18:49:15 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
integTest {
|
2015-11-24 19:10:04 -05:00
|
|
|
dependsOn copyWatcherRestTests
|
2015-11-24 18:49:15 -05:00
|
|
|
systemProperty 'tests.rest.blacklist',
|
|
|
|
['hijack/10_basic/*',
|
2015-12-14 06:09:00 -05:00
|
|
|
'getting_started/10_monitor_cluster_health/Getting started - Monitor cluster health'].join(',')
|
2015-11-24 18:49:15 -05:00
|
|
|
|
|
|
|
cluster {
|
2016-12-14 18:02:28 -05:00
|
|
|
plugin ':x-pack:elasticsearch'
|
2016-03-30 03:07:57 -04:00
|
|
|
extraConfigFile 'x-pack/roles.yml', 'roles.yml'
|
2015-11-24 18:49:15 -05:00
|
|
|
setupCommand 'setupTestAdminUser',
|
2016-02-10 09:42:59 -05:00
|
|
|
'bin/x-pack/users', 'useradd', 'test_admin', '-p', 'changeme', '-r', 'superuser'
|
2015-11-24 18:49:15 -05:00
|
|
|
setupCommand 'setupWatcherManagerUser',
|
2016-03-30 03:07:57 -04:00
|
|
|
'bin/x-pack/users', 'useradd', 'watcher_manager', '-p', 'changeme', '-r', 'watcher_manager'
|
2015-11-24 18:49:15 -05:00
|
|
|
setupCommand 'setupPowerlessUser',
|
2016-03-30 03:07:57 -04:00
|
|
|
'bin/x-pack/users', 'useradd', 'powerless_user', '-p', 'changeme', '-r', 'crappy_role'
|
2015-11-24 18:49:15 -05:00
|
|
|
waitCondition = { node, ant ->
|
|
|
|
File tmpFile = new File(node.cwd, 'wait.success')
|
2015-12-11 21:23:01 -05:00
|
|
|
ant.get(src: "http://${node.httpUri()}",
|
2015-11-24 18:49:15 -05:00
|
|
|
dest: tmpFile.toString(),
|
|
|
|
username: 'test_admin',
|
|
|
|
password: 'changeme',
|
|
|
|
ignoreerrors: true,
|
|
|
|
retries: 10)
|
|
|
|
return tmpFile.exists()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|