Ryan Ernst 6d4d599f91 Build: Convert xplugins to use new extra projects setup (elastic/elasticsearch#4175)
* Build: Convert xplugins to use new extra projects setup

This change makes the gradle initialization for xplugins look in the
correct location for elasticsearch, which is now as a sibling of an
elasticsearch-extra directory, with x-plugins as a child of the extra
directory.

The elasticsearch side of this change is
elastic/elasticsearchelastic/elasticsearch#21773. This change will enable renaming x-plugins
to x-pack, see elastic/elasticsearch#3643.

Original commit: elastic/x-pack-elasticsearch@09398aea5a
2016-12-14 15:02:28 -08:00

51 lines
1.7 KiB
Groovy

subprojects {
apply plugin: 'elasticsearch.rest-test'
dependencies {
testCompile project(path: ':x-pack:elasticsearch', configuration: 'runtime')
}
// bring in monitoring rest test suite
task copyMonitoringRestTests(type: Copy) {
into project.sourceSets.test.output.resourcesDir
from project(':x-pack:elasticsearch').sourceSets.test.resources.srcDirs
include 'rest-api-spec/test/monitoring/**'
}
integTest {
dependsOn copyMonitoringRestTests
cluster {
systemProperty 'es.logger.level', 'TRACE'
plugin ':x-pack:elasticsearch'
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'
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()
}
}
}
}
/**
* Allow {@code integTest} to be invoked on this project to run both Monitoring+Security smoke tests.
*/
task integTest {
dependsOn subprojects.integTest
}