2018-09-15 10:18:59 -04:00
|
|
|
import org.elasticsearch.gradle.test.RestIntegTestTask
|
|
|
|
|
2019-05-29 09:16:04 -04:00
|
|
|
apply plugin: 'elasticsearch.testclusters'
|
2018-09-15 10:18:59 -04:00
|
|
|
apply plugin: 'elasticsearch.standalone-test'
|
|
|
|
|
2020-02-26 09:13:41 -05:00
|
|
|
restResources {
|
|
|
|
restApi {
|
2020-04-17 15:04:17 -04:00
|
|
|
includeCore '_common', 'cluster', 'nodes', 'indices', 'index', 'info'
|
2020-02-26 09:13:41 -05:00
|
|
|
includeXpack 'ccr'
|
2020-04-17 15:04:17 -04:00
|
|
|
}
|
2020-02-26 09:13:41 -05:00
|
|
|
}
|
|
|
|
|
2018-09-15 10:18:59 -04:00
|
|
|
dependencies {
|
2019-11-14 06:01:23 -05:00
|
|
|
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
|
|
|
|
testCompile project(path: xpackModule('ccr'), configuration: 'runtime')
|
2018-09-15 10:18:59 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
task restTest(type: RestIntegTestTask) {
|
2019-11-14 06:01:23 -05:00
|
|
|
mustRunAfter(precommit)
|
2018-09-15 10:18:59 -04:00
|
|
|
}
|
|
|
|
|
2019-05-29 09:16:04 -04:00
|
|
|
testClusters.restTest {
|
2019-11-14 06:01:23 -05:00
|
|
|
testDistribution = 'DEFAULT'
|
|
|
|
// Disable assertions in FollowingEngineAssertions, otherwise an AssertionError is thrown before
|
|
|
|
// indexing a document directly in a follower index. In a rest test we like to test the exception
|
|
|
|
// that is thrown in production when indexing a document directly in a follower index.
|
|
|
|
jvmArgs '-da:org.elasticsearch.xpack.ccr.index.engine.FollowingEngineAssertions'
|
|
|
|
setting 'xpack.ml.enabled', 'false'
|
|
|
|
setting 'xpack.security.enabled', 'true'
|
|
|
|
setting 'xpack.license.self_generated.type', 'trial'
|
|
|
|
// TODO: reduce the need for superuser here
|
|
|
|
user username: 'ccr-user', password: 'ccr-user-password', role: 'superuser'
|
2018-09-15 10:18:59 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
check.dependsOn restTest
|
2019-04-09 14:52:50 -04:00
|
|
|
test.enabled = false
|