2017-01-04 14:27:53 -05:00
|
|
|
apply plugin: 'elasticsearch.standalone-rest-test'
|
2015-11-24 18:49:15 -05:00
|
|
|
apply plugin: 'elasticsearch.rest-test'
|
|
|
|
|
|
|
|
dependencies {
|
2018-01-27 00:48:30 -05:00
|
|
|
testCompile project(path: xpackModule('core'), 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
|
2018-01-27 00:48:30 -05:00
|
|
|
from project(xpackProject('plugin').path).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
|
|
|
}
|
|
|
|
|
2017-02-22 03:56:52 -05:00
|
|
|
integTestRunner {
|
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(',')
|
2017-02-22 03:56:52 -05:00
|
|
|
}
|
2015-11-24 18:49:15 -05:00
|
|
|
|
2017-02-22 03:56:52 -05:00
|
|
|
integTestCluster {
|
2017-04-17 19:04:09 -04:00
|
|
|
dependsOn copyWatcherRestTests
|
2017-06-23 04:40:31 -04:00
|
|
|
setting 'xpack.monitoring.enabled', 'false'
|
|
|
|
setting 'xpack.ml.enabled', 'false'
|
2017-11-28 07:11:49 -05:00
|
|
|
// settings to test settings filtering on
|
|
|
|
setting 'xpack.notification.email.account._email.smtp.host', 'host.domain'
|
|
|
|
setting 'xpack.notification.email.account._email.smtp.port', '587'
|
|
|
|
setting 'xpack.notification.email.account._email.smtp.user', '_user'
|
|
|
|
setting 'xpack.notification.email.account._email.smtp.password', '_passwd'
|
2018-02-12 14:57:04 -05:00
|
|
|
setting 'xpack.license.self_generated.type', 'trial'
|
2018-01-27 00:48:30 -05:00
|
|
|
plugin xpackProject('plugin').path
|
2017-02-22 03:56:52 -05:00
|
|
|
extraConfigFile 'x-pack/roles.yml', 'roles.yml'
|
|
|
|
setupCommand 'setupTestAdminUser',
|
2017-06-29 16:27:57 -04:00
|
|
|
'bin/x-pack/users', 'useradd', 'test_admin', '-p', 'x-pack-test-password', '-r', 'superuser'
|
2017-12-11 07:08:58 -05:00
|
|
|
setupCommand 'setupXpackUserForTests',
|
|
|
|
'bin/x-pack/users', 'useradd', 'x_pack_rest_user', '-p', 'x-pack-test-password', '-r', 'watcher_manager'
|
2017-02-22 03:56:52 -05:00
|
|
|
setupCommand 'setupWatcherManagerUser',
|
2017-06-29 16:27:57 -04:00
|
|
|
'bin/x-pack/users', 'useradd', 'watcher_manager', '-p', 'x-pack-test-password', '-r', 'watcher_manager'
|
2017-02-22 03:56:52 -05:00
|
|
|
setupCommand 'setupPowerlessUser',
|
2017-06-29 16:27:57 -04:00
|
|
|
'bin/x-pack/users', 'useradd', 'powerless_user', '-p', 'x-pack-test-password', '-r', 'crappy_role'
|
2017-02-22 03:56:52 -05:00
|
|
|
waitCondition = { node, ant ->
|
|
|
|
File tmpFile = new File(node.cwd, 'wait.success')
|
2017-03-15 13:23:26 -04:00
|
|
|
ant.get(src: "http://${node.httpUri()}/_cluster/health?wait_for_nodes=>=${numNodes}&wait_for_status=yellow",
|
2017-02-22 03:56:52 -05:00
|
|
|
dest: tmpFile.toString(),
|
|
|
|
username: 'test_admin',
|
2017-06-29 16:27:57 -04:00
|
|
|
password: 'x-pack-test-password',
|
2017-02-22 03:56:52 -05:00
|
|
|
ignoreerrors: true,
|
|
|
|
retries: 10)
|
|
|
|
return tmpFile.exists()
|
2015-11-24 18:49:15 -05:00
|
|
|
}
|
|
|
|
}
|