2016-05-19 02:08:33 -04:00
|
|
|
subprojects {
|
2017-01-04 14:27:53 -05:00
|
|
|
apply plugin: 'elasticsearch.standalone-rest-test'
|
2016-05-19 02:08:33 -04:00
|
|
|
apply plugin: 'elasticsearch.rest-test'
|
2016-03-31 12:01:31 -04:00
|
|
|
|
2016-05-19 02:08:33 -04:00
|
|
|
dependencies {
|
2017-02-10 14:02:42 -05:00
|
|
|
testCompile project(path: ':x-pack-elasticsearch:plugin', configuration: 'runtime')
|
2016-05-19 02:08:33 -04:00
|
|
|
}
|
2016-03-31 12:01:31 -04:00
|
|
|
|
2016-05-19 02:08:33 -04:00
|
|
|
// bring in monitoring rest test suite
|
|
|
|
task copyMonitoringRestTests(type: Copy) {
|
|
|
|
into project.sourceSets.test.output.resourcesDir
|
2017-02-10 14:02:42 -05:00
|
|
|
from project(':x-pack-elasticsearch:plugin').sourceSets.test.resources.srcDirs
|
2016-05-19 02:08:33 -04:00
|
|
|
include 'rest-api-spec/test/monitoring/**'
|
|
|
|
}
|
2016-03-31 12:01:31 -04:00
|
|
|
|
2016-05-19 02:08:33 -04:00
|
|
|
integTest {
|
|
|
|
dependsOn copyMonitoringRestTests
|
2017-02-22 03:56:52 -05:00
|
|
|
}
|
2016-03-31 12:01:31 -04:00
|
|
|
|
2017-02-22 03:56:52 -05:00
|
|
|
integTestCluster {
|
|
|
|
systemProperty 'es.logger.level', 'TRACE'
|
|
|
|
plugin ':x-pack-elasticsearch:plugin'
|
|
|
|
setting 'xpack.monitoring.collection.interval', '3s'
|
|
|
|
extraConfigFile 'x-pack/roles.yml', '../roles.yml'
|
|
|
|
setupCommand 'setupTestAdminUser',
|
|
|
|
'bin/x-pack/users', 'useradd', 'test_admin', '-p', 'changeme', '-r', 'superuser'
|
|
|
|
setupCommand 'setupMonitoredSystemUser',
|
|
|
|
'bin/x-pack/users', 'useradd', 'monitoring_system', '-p', 'changeme', '-r', 'monitoring_system,monitoring_without_bulk'
|
|
|
|
setupCommand 'setupPowerlessUser',
|
|
|
|
'bin/x-pack/users', 'useradd', 'not_monitoring_system', '-p', 'changeme', '-r', 'monitoring_without_bulk'
|
2016-03-31 12:01:31 -04:00
|
|
|
|
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',
|
|
|
|
password: 'changeme',
|
|
|
|
ignoreerrors: true,
|
|
|
|
retries: 10)
|
|
|
|
return tmpFile.exists()
|
2016-03-31 12:01:31 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-05-19 02:08:33 -04:00
|
|
|
/**
|
|
|
|
* Allow {@code integTest} to be invoked on this project to run both Monitoring+Security smoke tests.
|
|
|
|
*/
|
|
|
|
task integTest {
|
|
|
|
dependsOn subprojects.integTest
|
|
|
|
}
|