make smoke test plugins (and ssl) work again

Original commit: elastic/x-pack-elasticsearch@3d2413823e
This commit is contained in:
Ryan Ernst 2015-12-03 23:36:35 -08:00
parent 3ec04ba40f
commit c8de04ae14
4 changed files with 26 additions and 21 deletions

View File

@ -1,4 +1,5 @@
import org.elasticsearch.gradle.LoggedExec import org.elasticsearch.gradle.LoggedExec
import org.elasticsearch.gradle.MavenFilteringHack
apply plugin: 'elasticsearch.rest-test' apply plugin: 'elasticsearch.rest-test'
@ -31,12 +32,11 @@ task createKey(type: LoggedExec) {
sourceSets.test.resources.srcDir(keystore.parentFile) sourceSets.test.resources.srcDir(keystore.parentFile)
processTestResources.dependsOn(createKey) processTestResources.dependsOn(createKey)
// add ES plugins, this loop must be outside of a configuration closure, otherwise it may get executed multiple times ext.pluginsCount = 4 // we install xplugins explicitly
for (Project subproj : project.rootProject.subprojects) { project.rootProject.subprojects.findAll { it.path.startsWith(':plugins:') }.each { subproj ->
if (subproj.path.startsWith(':plugins:')) { // need to get a non-decorated project object, so must re-lookup the project by path
// need to get a non-decorated project object, so must re-lookup the project by path integTest.cluster.plugin(subproj.name, project(subproj.path))
integTest.clusterConfig.plugin(subproj.name, project(subproj.path)) pluginsCount += 1
}
} }
integTest { integTest {
@ -66,3 +66,15 @@ integTest {
} }
} }
} }
ext.expansions = [
'expected.plugins.count': pluginsCount
]
processTestResources {
from(sourceSets.test.resources.srcDirs) {
include '**/*.yaml'
inputs.properties(expansions)
MavenFilteringHack.filter(it, expansions)
}
}

View File

@ -10,7 +10,4 @@
- do: - do:
nodes.info: {} nodes.info: {}
- match: { nodes.$master.plugins.13.name: license } - length: { nodes.$master.plugins: ${expected.plugins.count} }
- match: { nodes.$master.plugins.17.name: marvel-agent }
- match: { nodes.$master.plugins.20.name: shield }
- match: { nodes.$master.plugins.23.name: watcher }

View File

@ -6,17 +6,13 @@ dependencies {
testCompile project(path: ':x-plugins:shield', configuration: 'runtime') testCompile project(path: ':x-plugins:shield', configuration: 'runtime')
} }
ext.pluginCount = 0 ext.pluginsCount = 4 // we install xplugins explicitly
// this loop must be outside of a configuration closure, otherwise it may get executed multiple times project.rootProject.subprojects.findAll { it.path.startsWith(':plugins:') }.each { subproj ->
for (Project subproj : project.rootProject.subprojects) { // need to get a non-decorated project object, so must re-lookup the project by path
if (subproj.path.startsWith(':plugins:')) { integTest.cluster.plugin(subproj.name, project(subproj.path))
// need to get a non-decorated project object, so must re-lookup the project by path pluginsCount += 1
integTest.clusterConfig.plugin(subproj.name, project(subproj.path))
project.pluginCount += 1
}
} }
project.pluginCount += 4
integTest { integTest {
cluster { cluster {
plugin 'licence', project(':x-plugins:license:plugin') plugin 'licence', project(':x-plugins:license:plugin')
@ -40,7 +36,7 @@ integTest {
} }
ext.expansions = [ ext.expansions = [
'expected.plugin.count': pluginCount 'expected.plugins.count': pluginsCount
] ]
processTestResources { processTestResources {

View File

@ -10,5 +10,5 @@
- do: - do:
nodes.info: {} nodes.info: {}
- length: { nodes.$master.plugins: ${expected.plugin.count} } - length: { nodes.$master.plugins: ${expected.plugins.count} }
# TODO: check that every plugin is installed # TODO: check that every plugin is installed