2015-11-24 18:49:15 -05:00
|
|
|
apply plugin: 'elasticsearch.rest-test'
|
|
|
|
|
|
|
|
dependencies {
|
2015-11-25 18:28:45 -05:00
|
|
|
testCompile project(path: ':x-plugins:elasticsearch:x-pack', 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
|
2015-11-25 18:28:45 -05:00
|
|
|
from project(':x-plugins:elasticsearch:x-pack').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
|
|
|
'array_compare_watch/10_basic/Basic array_compare watch',
|
|
|
|
'getting_started/10_monitor_cluster_health/Getting started - Monitor cluster health'].join(',')
|
2015-11-24 18:49:15 -05:00
|
|
|
|
|
|
|
cluster {
|
2016-07-15 17:36:13 -04:00
|
|
|
plugin ':x-plugins:elasticsearch:x-pack'
|
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()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|