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
|
2016-03-31 12:01:31 -04:00
|
|
|
|
2016-05-19 02:08:33 -04:00
|
|
|
cluster {
|
|
|
|
systemProperty 'es.logger.level', 'TRACE'
|
2017-02-10 14:02:42 -05:00
|
|
|
plugin ':x-pack-elasticsearch:plugin'
|
2016-07-07 17:59:39 -04:00
|
|
|
setting 'xpack.monitoring.collection.interval', '3s'
|
2016-05-19 02:08:33 -04:00
|
|
|
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
|
|
|
|
2016-05-19 02:08:33 -04: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()
|
|
|
|
}
|
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
|
|
|
|
}
|