Convert enrich qa modules to use testclusters.
This commit is contained in:
parent
8a48ef2a06
commit
c79a8e448d
|
@ -1,38 +1,18 @@
|
||||||
import org.elasticsearch.gradle.test.RestIntegTestTask
|
apply plugin: 'elasticsearch.testclusters'
|
||||||
|
apply plugin: 'elasticsearch.standalone-rest-test'
|
||||||
apply plugin: 'elasticsearch.standalone-test'
|
apply plugin: 'elasticsearch.rest-test'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
testCompile project(path: xpackModule('enrich'), configuration: 'runtime')
|
testCompile project(path: xpackModule('enrich'), configuration: 'runtime')
|
||||||
testCompile project(path: xpackModule('core'), configuration: 'runtime')
|
testCompile project(path: xpackModule('core'), configuration: 'runtime')
|
||||||
testCompile project(path: xpackModule('enrich:qa:common'), configuration: 'runtime')}
|
testCompile project(path: xpackModule('enrich:qa:common'), configuration: 'runtime')}
|
||||||
|
|
||||||
task restTest(type: RestIntegTestTask) {
|
testClusters.integTest {
|
||||||
mustRunAfter(precommit)
|
testDistribution = 'DEFAULT'
|
||||||
}
|
extraConfigFile 'roles.yml', file('roles.yml')
|
||||||
|
user username: "test_admin", password: "x-pack-test-password", role: "superuser"
|
||||||
restTestCluster {
|
user username: "test_enrich", password: "x-pack-test-password", role: "enrich_user,integ_test_role"
|
||||||
distribution 'default'
|
user username: "test_enrich_no_privs", password: "x-pack-test-password", role: "enrich_no_privs"
|
||||||
setting 'xpack.license.self_generated.type', 'basic'
|
setting 'xpack.license.self_generated.type', 'basic'
|
||||||
setting 'xpack.security.enabled', 'true'
|
setting 'xpack.security.enabled', 'true'
|
||||||
extraConfigFile 'roles.yml', 'roles.yml'
|
|
||||||
setupCommand 'setupTestAdmin',
|
|
||||||
'bin/elasticsearch-users', 'useradd', "test_admin", '-p', 'x-pack-test-password', '-r', "superuser"
|
|
||||||
setupCommand 'setupEnrichUser',
|
|
||||||
'bin/elasticsearch-users', 'useradd', "test_enrich", '-p', 'x-pack-test-password', '-r', "enrich_user,integ_test_role"
|
|
||||||
setupCommand 'setupEnrichUserNoPrivs',
|
|
||||||
'bin/elasticsearch-users', 'useradd', "test_enrich_no_privs", '-p', 'x-pack-test-password', '-r', "enrich_no_privs"
|
|
||||||
waitCondition = { node, ant ->
|
|
||||||
File tmpFile = new File(node.cwd, 'wait.success')
|
|
||||||
ant.get(src: "http://${node.httpUri()}/_cluster/health?wait_for_nodes=>=${numNodes}&wait_for_status=yellow",
|
|
||||||
dest: tmpFile.toString(),
|
|
||||||
username: 'test_admin',
|
|
||||||
password: 'x-pack-test-password',
|
|
||||||
ignoreerrors: true,
|
|
||||||
retries: 10)
|
|
||||||
return tmpFile.exists()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
check.dependsOn restTest
|
|
||||||
test.enabled = false
|
|
||||||
|
|
|
@ -1,20 +1,13 @@
|
||||||
import org.elasticsearch.gradle.test.RestIntegTestTask
|
apply plugin: 'elasticsearch.testclusters'
|
||||||
|
apply plugin: 'elasticsearch.standalone-rest-test'
|
||||||
apply plugin: 'elasticsearch.standalone-test'
|
apply plugin: 'elasticsearch.rest-test'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
testCompile project(path: xpackModule('enrich'), configuration: 'runtime')
|
testCompile project(path: xpackModule('enrich'), configuration: 'runtime')
|
||||||
testCompile project(path: xpackModule('enrich:qa:common'), configuration: 'runtime')
|
testCompile project(path: xpackModule('enrich:qa:common'), configuration: 'runtime')
|
||||||
}
|
}
|
||||||
|
|
||||||
task restTest(type: RestIntegTestTask) {
|
testClusters.integTest {
|
||||||
mustRunAfter(precommit)
|
testDistribution = 'DEFAULT'
|
||||||
}
|
|
||||||
|
|
||||||
restTestCluster {
|
|
||||||
distribution 'default'
|
|
||||||
setting 'xpack.license.self_generated.type', 'basic'
|
setting 'xpack.license.self_generated.type', 'basic'
|
||||||
}
|
}
|
||||||
|
|
||||||
check.dependsOn restTest
|
|
||||||
test.enabled = false
|
|
||||||
|
|
Loading…
Reference in New Issue