Build: Add back smoke test plugins for xplugins
This checks that all ES plugins and xplugins are installed. I also changed the rest check to be a simple plugin count, so it does not fail when new plugins are added. Original commit: elastic/x-pack-elasticsearch@eaab182e43
This commit is contained in:
parent
f0c0f75dbd
commit
66f3d18af0
|
@ -0,0 +1,50 @@
|
|||
import org.elasticsearch.gradle.MavenFilteringHack
|
||||
|
||||
apply plugin: 'elasticsearch.rest-test'
|
||||
|
||||
dependencies {
|
||||
testCompile project(path: ':x-plugins:shield', configuration: 'runtime')
|
||||
}
|
||||
|
||||
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 {
|
||||
plugin 'licence', project(':x-plugins:license:plugin')
|
||||
plugin 'shield', project(':x-plugins:shield')
|
||||
plugin 'watcher', project(':x-plugins:watcher')
|
||||
plugin 'marvel-agent', project(':x-plugins:marvel')
|
||||
|
||||
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)
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<project name="smoke-test-x-plugins"
|
||||
xmlns:ac="antlib:net.sf.antcontrib">
|
||||
|
||||
<import file="${elasticsearch.integ.antfile.default}"/>
|
||||
<import file="${elasticsearch.tools.directory}/ant/shield-overrides.xml"/>
|
||||
|
||||
</project>
|
|
@ -1,16 +0,0 @@
|
|||
# Integration tests for smoke testing plugins
|
||||
#
|
||||
"Plugins are actually installed":
|
||||
- do:
|
||||
cluster.state: {}
|
||||
|
||||
# Get master node id
|
||||
- set: { master_node: master }
|
||||
|
||||
- do:
|
||||
nodes.info: {}
|
||||
|
||||
- match: { nodes.$master.plugins.15.name: license }
|
||||
- match: { nodes.$master.plugins.18.name: marvel-agent }
|
||||
- match: { nodes.$master.plugins.21.name: shield }
|
||||
- match: { nodes.$master.plugins.24.name: watcher }
|
|
@ -0,0 +1,14 @@
|
|||
# Integration tests for smoke testing plugins
|
||||
#
|
||||
"Plugins are actually installed":
|
||||
- do:
|
||||
cluster.state: {}
|
||||
|
||||
# Get master node id
|
||||
- set: { master_node: master }
|
||||
|
||||
- do:
|
||||
nodes.info: {}
|
||||
|
||||
- length: { nodes.$master.plugins: ${expected.plugin.count} }
|
||||
# TODO: check that every plugin is installed
|
Loading…
Reference in New Issue