Merge pull request elastic/x-pack-elasticsearch#617 from rjernst/integ_test_order
Build: Convert integ test dsl to new split cluster/runner dsl Original commit: elastic/x-pack-elasticsearch@454edd48d1
This commit is contained in:
commit
2cd3979654
|
@ -291,10 +291,12 @@ project.afterEvaluate {
|
|||
}
|
||||
}
|
||||
|
||||
integTest {
|
||||
integTestRunner {
|
||||
// TODO: fix this rest test to not depend on a hardcoded port!
|
||||
systemProperty 'tests.rest.blacklist', 'getting_started/10_monitor_cluster_health/*,bulk/10_basic/*'
|
||||
cluster {
|
||||
}
|
||||
|
||||
integTestCluster {
|
||||
setting 'xpack.ml.enabled', 'true'
|
||||
setting 'xpack.monitoring.collection.interval', '3s'
|
||||
waitCondition = { NodeInfo node, AntBuilder ant ->
|
||||
|
@ -330,7 +332,6 @@ integTest {
|
|||
}
|
||||
return tmpFile.exists()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: don't publish test artifacts just to run messy tests, fix the tests!
|
||||
|
|
|
@ -13,8 +13,7 @@ task copyXPackPluginProps(type: Copy) {
|
|||
}
|
||||
project.sourceSets.test.output.dir(outputDir, builtBy: copyXPackPluginProps)
|
||||
|
||||
integTest {
|
||||
cluster {
|
||||
integTestCluster {
|
||||
plugin ':x-pack-elasticsearch:plugin'
|
||||
setting 'xpack.security.audit.enabled', 'true'
|
||||
setting 'xpack.security.audit.outputs', 'index'
|
||||
|
@ -31,5 +30,4 @@ integTest {
|
|||
retries: 10)
|
||||
return tmpFile.exists()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,9 @@ dependencies {
|
|||
|
||||
integTest {
|
||||
includePackaged true
|
||||
}
|
||||
|
||||
integTestRunner {
|
||||
systemProperty 'tests.rest.blacklist',
|
||||
['cat.aliases/10_basic/Empty cluster',
|
||||
'index/10_with_id/Index with ID',
|
||||
|
@ -15,8 +18,9 @@ integTest {
|
|||
'cat.templates/10_basic/Sort templates',
|
||||
'cat.templates/10_basic/Multiple template',
|
||||
].join(',')
|
||||
}
|
||||
|
||||
cluster {
|
||||
integTestCluster {
|
||||
plugin ':x-pack-elasticsearch:plugin'
|
||||
setting 'xpack.watcher.enabled', 'false'
|
||||
setting 'xpack.monitoring.enabled', 'false'
|
||||
|
@ -32,5 +36,4 @@ integTest {
|
|||
retries: 10)
|
||||
return tmpFile.exists()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,12 +5,10 @@ dependencies {
|
|||
testCompile project(path: ':x-pack-elasticsearch:plugin', configuration: 'runtime')
|
||||
}
|
||||
|
||||
integTest {
|
||||
cluster {
|
||||
integTestCluster {
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
setting 'xpack.ml.enabled', 'true'
|
||||
numNodes = 3
|
||||
distribution = 'zip'
|
||||
plugin ':x-pack-elasticsearch:plugin'
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,12 +5,10 @@ dependencies {
|
|||
testCompile project(path: ':x-pack-elasticsearch:plugin', configuration: 'runtime')
|
||||
}
|
||||
|
||||
integTest {
|
||||
cluster {
|
||||
integTestCluster {
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
setting 'xpack.ml.enabled', 'false'
|
||||
numNodes = 1
|
||||
distribution = 'zip'
|
||||
plugin ':x-pack-elasticsearch:plugin'
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,12 +6,10 @@ dependencies {
|
|||
testCompile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.8.6'
|
||||
}
|
||||
|
||||
integTest {
|
||||
cluster {
|
||||
integTestCluster {
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
setting 'xpack.ml.enabled', 'true'
|
||||
setting 'script.inline', 'true'
|
||||
distribution = 'zip'
|
||||
plugin ':x-pack-elasticsearch:plugin'
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,8 +7,7 @@ dependencies {
|
|||
testCompile project(path: ':modules:reindex')
|
||||
}
|
||||
|
||||
integTest {
|
||||
cluster {
|
||||
integTestCluster {
|
||||
setting 'script.inline', 'true'
|
||||
plugin ':x-pack-elasticsearch:plugin'
|
||||
// Whitelist reindexing from the local node so we can test it.
|
||||
|
@ -36,5 +35,4 @@ integTest {
|
|||
retries: 10)
|
||||
return tmpFile.exists()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,7 +51,9 @@ String outputDir = "generated-resources/${project.name}"
|
|||
|
||||
task oldClusterTest(type: RestIntegTestTask) {
|
||||
mustRunAfter(precommit)
|
||||
cluster {
|
||||
}
|
||||
|
||||
oldClusterTestCluster {
|
||||
plugin ':x-pack-elasticsearch:plugin'
|
||||
distribution = 'zip'
|
||||
bwcVersion = '5.4.0-SNAPSHOT' // TODO: either randomize, or make this settable with sysprop
|
||||
|
@ -64,13 +66,16 @@ task oldClusterTest(type: RestIntegTestTask) {
|
|||
setting 'xpack.ssl.keystore.path', 'testnode.jks'
|
||||
setting 'xpack.ssl.keystore.password', 'testnode'
|
||||
extraConfigFile 'testnode.jks', new File(outputDir + '/testnode.jks')
|
||||
}
|
||||
}
|
||||
oldClusterTestRunner {
|
||||
systemProperty 'tests.rest.suite', 'old_cluster'
|
||||
}
|
||||
|
||||
task mixedClusterTest(type: RestIntegTestTask) {
|
||||
dependsOn(oldClusterTest, 'oldClusterTest#node1.stop')
|
||||
cluster {
|
||||
dependsOn(oldClusterTestRunner, 'oldClusterTestCluster#node1.stop')
|
||||
}
|
||||
|
||||
mixedClusterTestCluster {
|
||||
plugin ':x-pack-elasticsearch:plugin'
|
||||
distribution = 'zip'
|
||||
clusterName = 'rolling-upgrade'
|
||||
|
@ -80,14 +85,18 @@ task mixedClusterTest(type: RestIntegTestTask) {
|
|||
setting 'xpack.ssl.keystore.path', 'testnode.jks'
|
||||
setting 'xpack.ssl.keystore.password', 'testnode'
|
||||
extraConfigFile 'testnode.jks', new File(outputDir + '/testnode.jks')
|
||||
}
|
||||
}
|
||||
|
||||
mixedClusterTestRunner {
|
||||
systemProperty 'tests.rest.suite', 'mixed_cluster'
|
||||
finalizedBy 'oldClusterTest#node0.stop'
|
||||
finalizedBy 'oldClusterTestCluster#node0.stop'
|
||||
}
|
||||
|
||||
task upgradedClusterTest(type: RestIntegTestTask) {
|
||||
dependsOn(mixedClusterTest, 'oldClusterTest#node0.stop')
|
||||
cluster {
|
||||
dependsOn(mixedClusterTestRunner, 'oldClusterTestCluster#node0.stop')
|
||||
}
|
||||
|
||||
upgradedClusterTestCluster {
|
||||
plugin ':x-pack-elasticsearch:plugin'
|
||||
distribution = 'zip'
|
||||
clusterName = 'rolling-upgrade'
|
||||
|
@ -97,10 +106,12 @@ task upgradedClusterTest(type: RestIntegTestTask) {
|
|||
setting 'xpack.ssl.keystore.path', 'testnode.jks'
|
||||
setting 'xpack.ssl.keystore.password', 'testnode'
|
||||
extraConfigFile 'testnode.jks', new File(outputDir + '/testnode.jks')
|
||||
}
|
||||
}
|
||||
|
||||
upgradedClusterTestRunner {
|
||||
systemProperty 'tests.rest.suite', 'upgraded_cluster'
|
||||
// only need to kill the mixed cluster tests node here because we explicitly told it to not stop nodes upon completion
|
||||
finalizedBy 'mixedClusterTest#stop'
|
||||
finalizedBy 'mixedClusterTestCluster#stop'
|
||||
}
|
||||
|
||||
task integTest {
|
||||
|
|
|
@ -14,9 +14,11 @@ task copyXPackPluginProps(type: Copy) {
|
|||
}
|
||||
project.sourceSets.test.output.dir(outputDir, builtBy: copyXPackPluginProps)
|
||||
|
||||
integTest {
|
||||
integTestRunner {
|
||||
systemProperty 'tests.security.manager', 'false'
|
||||
cluster {
|
||||
}
|
||||
|
||||
integTestCluster {
|
||||
plugin ':x-pack-elasticsearch:plugin'
|
||||
setupCommand 'setupDummyUser',
|
||||
'bin/x-pack/users', 'useradd', 'test_user', '-p', 'changeme', '-r', 'superuser'
|
||||
|
@ -32,5 +34,4 @@ integTest {
|
|||
retries: 10)
|
||||
return tmpFile.exists()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,8 +44,13 @@ task buildZip(type:Zip, dependsOn: [jar]) {
|
|||
}
|
||||
|
||||
task integTest(type: org.elasticsearch.gradle.test.RestIntegTestTask, dependsOn: buildZip) {
|
||||
mustRunAfter precommit
|
||||
}
|
||||
|
||||
integTestRunner {
|
||||
systemProperty 'tests.security.manager', 'false'
|
||||
cluster {
|
||||
}
|
||||
integTestCluster {
|
||||
plugin ':x-pack-elasticsearch:plugin'
|
||||
setting 'xpack.security.authc.realms.custom.order', '0'
|
||||
setting 'xpack.security.authc.realms.custom.type', 'custom'
|
||||
|
@ -67,7 +72,5 @@ task integTest(type: org.elasticsearch.gradle.test.RestIntegTestTask, dependsOn:
|
|||
retries: 10)
|
||||
return tmpFile.exists()
|
||||
}
|
||||
}
|
||||
}
|
||||
check.dependsOn integTest
|
||||
integTest.mustRunAfter precommit
|
||||
|
|
|
@ -6,8 +6,7 @@ dependencies {
|
|||
testCompile project(path: ':x-pack-elasticsearch:transport-client', configuration: 'runtime')
|
||||
}
|
||||
|
||||
integTest {
|
||||
cluster {
|
||||
integTestCluster {
|
||||
setting 'script.inline', 'true'
|
||||
plugin ':x-pack-elasticsearch:plugin'
|
||||
extraConfigFile 'x-pack/roles.yml', 'roles.yml'
|
||||
|
@ -30,5 +29,4 @@ integTest {
|
|||
retries: 10)
|
||||
return tmpFile.exists()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,8 +14,9 @@ task copyGraphRestTests(type: Copy) {
|
|||
|
||||
integTest {
|
||||
dependsOn copyGraphRestTests
|
||||
}
|
||||
|
||||
cluster {
|
||||
integTestCluster {
|
||||
plugin ':x-pack-elasticsearch:plugin'
|
||||
extraConfigFile 'x-pack/roles.yml', 'roles.yml'
|
||||
setupCommand 'setupTestAdminUser',
|
||||
|
@ -34,5 +35,4 @@ integTest {
|
|||
retries: 10)
|
||||
return tmpFile.exists()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,8 +15,9 @@ subprojects {
|
|||
|
||||
integTest {
|
||||
dependsOn copyMonitoringRestTests
|
||||
}
|
||||
|
||||
cluster {
|
||||
integTestCluster {
|
||||
systemProperty 'es.logger.level', 'TRACE'
|
||||
plugin ':x-pack-elasticsearch:plugin'
|
||||
setting 'xpack.monitoring.collection.interval', '3s'
|
||||
|
@ -39,7 +40,6 @@ subprojects {
|
|||
return tmpFile.exists()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -157,12 +157,11 @@ processTestResources.dependsOn(
|
|||
ext.pluginsCount = 1 // we install xpack explicitly
|
||||
project.rootProject.subprojects.findAll { it.path.startsWith(':plugins:') }.each { subproj ->
|
||||
// need to get a non-decorated project object, so must re-lookup the project by path
|
||||
integTest.cluster.plugin(subproj.path)
|
||||
integTestCluster.plugin(subproj.path)
|
||||
pluginsCount += 1
|
||||
}
|
||||
|
||||
integTest {
|
||||
cluster {
|
||||
integTestCluster {
|
||||
setting 'xpack.monitoring.collection.interval', '3s'
|
||||
setting 'xpack.monitoring.exporters._http.type', 'http'
|
||||
setting 'xpack.monitoring.exporters._http.enabled', 'false'
|
||||
|
@ -228,7 +227,6 @@ integTest {
|
|||
}
|
||||
return tmpFile.exists()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ext.expansions = [
|
||||
|
|
|
@ -10,12 +10,11 @@ dependencies {
|
|||
ext.pluginsCount = 1 // we install xpack explicitly
|
||||
project.rootProject.subprojects.findAll { it.path.startsWith(':plugins:') }.each { subproj ->
|
||||
// need to get a non-decorated project object, so must re-lookup the project by path
|
||||
integTest.cluster.plugin(subproj.path)
|
||||
integTestCluster.plugin(subproj.path)
|
||||
pluginsCount += 1
|
||||
}
|
||||
|
||||
integTest {
|
||||
cluster {
|
||||
integTestCluster {
|
||||
plugin ':x-pack-elasticsearch:plugin'
|
||||
|
||||
setupCommand 'setupDummyUser',
|
||||
|
@ -30,7 +29,6 @@ integTest {
|
|||
retries: 10)
|
||||
return tmpFile.exists()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ext.expansions = [
|
||||
|
|
|
@ -6,8 +6,7 @@ dependencies {
|
|||
testCompile project(path: ':modules:lang-mustache', configuration: 'runtime')
|
||||
}
|
||||
|
||||
integTest {
|
||||
cluster {
|
||||
integTestCluster {
|
||||
plugin ':x-pack-elasticsearch:plugin'
|
||||
setting 'xpack.watcher.enabled', 'false'
|
||||
setting 'xpack.monitoring.enabled', 'false'
|
||||
|
@ -24,5 +23,4 @@ integTest {
|
|||
retries: 10)
|
||||
return tmpFile.exists()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,8 +6,7 @@ dependencies {
|
|||
testCompile project(path: ':modules:lang-mustache', configuration: 'runtime')
|
||||
}
|
||||
|
||||
integTest {
|
||||
cluster {
|
||||
integTestCluster {
|
||||
plugin ':x-pack-elasticsearch:plugin'
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
setting 'xpack.monitoring.enabled', 'false'
|
||||
|
@ -16,5 +15,4 @@ integTest {
|
|||
setting 'script.stored', 'true'
|
||||
// Need to allow more compilations per minute because of the integration tests
|
||||
setting 'script.max_compilations_per_minute', '100'
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,11 +6,9 @@ dependencies {
|
|||
testCompile project(path: ':modules:lang-painless', configuration: 'runtime')
|
||||
}
|
||||
|
||||
integTest {
|
||||
cluster {
|
||||
integTestCluster {
|
||||
plugin ':x-pack-elasticsearch:plugin'
|
||||
setting 'script.inline', 'true'
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
setting 'xpack.monitoring.enabled', 'false'
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,11 +14,15 @@ task copyWatcherRestTests(type: Copy) {
|
|||
|
||||
integTest {
|
||||
dependsOn copyWatcherRestTests
|
||||
}
|
||||
|
||||
integTestRunner {
|
||||
systemProperty 'tests.rest.blacklist',
|
||||
['hijack/10_basic/*',
|
||||
'getting_started/10_monitor_cluster_health/Getting started - Monitor cluster health'].join(',')
|
||||
}
|
||||
|
||||
cluster {
|
||||
integTestCluster {
|
||||
plugin ':x-pack-elasticsearch:plugin'
|
||||
extraConfigFile 'x-pack/roles.yml', 'roles.yml'
|
||||
setupCommand 'setupTestAdminUser',
|
||||
|
@ -37,5 +41,4 @@ integTest {
|
|||
retries: 10)
|
||||
return tmpFile.exists()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,8 +17,7 @@ ext {
|
|||
jiraProject = 'XWT'
|
||||
}
|
||||
|
||||
integTest {
|
||||
cluster {
|
||||
integTestCluster {
|
||||
plugin ':x-pack-elasticsearch:plugin'
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
setting 'xpack.monitoring.enabled', 'false'
|
||||
|
@ -38,7 +37,6 @@ integTest {
|
|||
setting 'xpack.notification.jira.account.test.password', jiraPassword
|
||||
setting 'xpack.notification.jira.account.test.issue_defaults.project.key', jiraProject
|
||||
setting 'xpack.notification.jira.account.test.issue_defaults.labels', ['integration-tests', project.version]
|
||||
}
|
||||
}
|
||||
|
||||
/** Clean up JIRA after tests: delete all created issues **/
|
||||
|
@ -53,7 +51,7 @@ task cleanJira(type: DefaultTask) {
|
|||
}
|
||||
}
|
||||
}
|
||||
integTest.finalizedBy cleanJira
|
||||
integTestRunner.finalizedBy cleanJira
|
||||
|
||||
/** List all issues associated to a given Jira project **/
|
||||
def jiraIssues(String projectKey) {
|
||||
|
|
|
@ -10,44 +10,33 @@ dependencies {
|
|||
testCompile project(path: ':x-pack-elasticsearch:plugin', configuration: 'testArtifacts')
|
||||
}
|
||||
|
||||
List<NodeInfo> cluster1Nodes
|
||||
|
||||
task setupClusterOne(type: DefaultTask) {
|
||||
mustRunAfter(precommit)
|
||||
ClusterConfiguration cluster1Config = new ClusterConfiguration(project)
|
||||
cluster1Config.clusterName = 'cluster1'
|
||||
cluster1Config.setting('node.name', 'cluster1-node1')
|
||||
// x-pack
|
||||
cluster1Config.plugin(':x-pack-elasticsearch:plugin')
|
||||
cluster1Config.setting('xpack.monitoring.enabled', false)
|
||||
cluster1Config.setting('xpack.security.enabled', false)
|
||||
cluster1Config.setting('xpack.watcher.enabled', false)
|
||||
cluster1Config.setting('xpack.graph.enabled', false)
|
||||
ClusterConfiguration cluster1Config = new ClusterConfiguration(project)
|
||||
cluster1Config.clusterName = 'cluster1'
|
||||
cluster1Config.setting('node.name', 'cluster1-node1')
|
||||
// x-pack
|
||||
cluster1Config.plugin(':x-pack-elasticsearch:plugin')
|
||||
cluster1Config.setting('xpack.monitoring.enabled', false)
|
||||
cluster1Config.setting('xpack.security.enabled', false)
|
||||
cluster1Config.setting('xpack.watcher.enabled', false)
|
||||
cluster1Config.setting('xpack.graph.enabled', false)
|
||||
|
||||
cluster1Nodes = ClusterFormationTasks.setup(project, setupClusterOne, cluster1Config)
|
||||
}
|
||||
List<NodeInfo> cluster1Nodes = ClusterFormationTasks.setup(project, 'clusterOne', integTestRunner, cluster1Config)
|
||||
|
||||
List<NodeInfo> cluster2Nodes
|
||||
ClusterConfiguration cluster2Config = new ClusterConfiguration(project)
|
||||
cluster2Config.clusterName = 'cluster2'
|
||||
cluster2Config.setting('node.name', 'cluster2-node1')
|
||||
// x-pack
|
||||
cluster2Config.plugin(':x-pack-elasticsearch:plugin')
|
||||
cluster2Config.setting('xpack.monitoring.enabled', false)
|
||||
cluster2Config.setting('xpack.monitoring.enabled', false)
|
||||
cluster2Config.setting('xpack.security.enabled', false)
|
||||
cluster2Config.setting('xpack.watcher.enabled', false)
|
||||
cluster2Config.setting('xpack.graph.enabled', false)
|
||||
|
||||
task setupClusterTwo(type: DefaultTask) {
|
||||
mustRunAfter(precommit)
|
||||
ClusterConfiguration cluster2Config = new ClusterConfiguration(project)
|
||||
cluster2Config.clusterName = 'cluster2'
|
||||
cluster2Config.setting('node.name', 'cluster2-node1')
|
||||
// x-pack
|
||||
cluster2Config.plugin(':x-pack-elasticsearch:plugin')
|
||||
cluster2Config.setting('xpack.monitoring.enabled', false)
|
||||
cluster2Config.setting('xpack.monitoring.enabled', false)
|
||||
cluster2Config.setting('xpack.security.enabled', false)
|
||||
cluster2Config.setting('xpack.watcher.enabled', false)
|
||||
cluster2Config.setting('xpack.graph.enabled', false)
|
||||
List<NodeInfo> cluster2Nodes = ClusterFormationTasks.setup(project, 'clusterTwo', integTestRunner, cluster2Config)
|
||||
|
||||
cluster2Nodes = ClusterFormationTasks.setup(project, setupClusterTwo, cluster2Config)
|
||||
}
|
||||
|
||||
integTest {
|
||||
dependsOn(setupClusterOne, setupClusterTwo)
|
||||
cluster {
|
||||
integTestCluster {
|
||||
setting 'node.name', 'tribe-node'
|
||||
setting 'tribe.on_conflict', 'prefer_cluster1'
|
||||
setting 'tribe.cluster1.cluster.name', 'cluster1'
|
||||
|
@ -73,11 +62,10 @@ integTest {
|
|||
setting 'xpack.security.enabled', false
|
||||
setting 'xpack.watcher.enabled', false
|
||||
setting 'xpack.graph.enabled', false
|
||||
}
|
||||
}
|
||||
|
||||
integTestRunner {
|
||||
systemProperty 'tests.cluster', "${-> cluster1Nodes.get(0).transportUri()}"
|
||||
systemProperty 'tests.cluster2', "${-> cluster2Nodes.get(0).transportUri()}"
|
||||
systemProperty 'tests.tribe', "${-> integTest.nodes.get(0).transportUri()}"
|
||||
// need to kill the standalone nodes here
|
||||
finalizedBy 'setupClusterOne#stop'
|
||||
finalizedBy 'setupClusterTwo#stop'
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue