2015-11-24 20:07:04 -05:00
|
|
|
import org.elasticsearch.gradle.MavenFilteringHack
|
|
|
|
|
|
|
|
apply plugin: 'elasticsearch.rest-test'
|
|
|
|
|
|
|
|
dependencies {
|
2015-11-25 10:18:08 -05:00
|
|
|
testCompile project(path: ':x-plugins:elasticsearch:shield', configuration: 'runtime')
|
2015-11-24 20:07:04 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
ext.pluginCount = 0
|
|
|
|
// this loop must be outside of a configuration closure, otherwise it may get executed multiple times
|
|
|
|
for (Project subproj : project.rootProject.subprojects) {
|
|
|
|
if (subproj.path.startsWith(':plugins:')) {
|
|
|
|
// need to get a non-decorated project object, so must re-lookup the project by path
|
|
|
|
integTest.clusterConfig.plugin(subproj.name, project(subproj.path))
|
|
|
|
project.pluginCount += 1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
project.pluginCount += 4
|
|
|
|
integTest {
|
|
|
|
cluster {
|
2015-11-25 10:18:08 -05:00
|
|
|
plugin 'licence', project(':x-plugins:elasticsearch:license:plugin')
|
|
|
|
plugin 'shield', project(':x-plugins:elasticsearch:shield')
|
|
|
|
plugin 'watcher', project(':x-plugins:elasticsearch:watcher')
|
|
|
|
plugin 'marvel-agent', project(':x-plugins:elasticsearch:marvel')
|
2015-11-24 20:07:04 -05:00
|
|
|
|
|
|
|
setupCommand 'setupDummyUser',
|
|
|
|
'bin/shield/esusers', 'useradd', 'test_user', '-p', 'changeme', '-r', 'admin'
|
|
|
|
waitCondition = { node, ant ->
|
|
|
|
File tmpFile = new File(node.cwd, 'wait.success')
|
|
|
|
ant.get(src: "http://localhost:${node.httpPort()}",
|
|
|
|
dest: tmpFile.toString(),
|
|
|
|
username: 'test_user',
|
|
|
|
password: 'changeme',
|
|
|
|
ignoreerrors: true,
|
|
|
|
retries: 10)
|
|
|
|
return tmpFile.exists()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ext.expansions = [
|
|
|
|
'expected.plugin.count': pluginCount
|
|
|
|
]
|
|
|
|
|
|
|
|
processTestResources {
|
|
|
|
inputs.properties(expansions)
|
|
|
|
MavenFilteringHack.filter(it, expansions)
|
|
|
|
}
|
|
|
|
|