38 lines
1.3 KiB
Groovy
38 lines
1.3 KiB
Groovy
import org.elasticsearch.gradle.test.RestIntegTestTask
|
|
|
|
apply plugin: 'elasticsearch.testclusters'
|
|
apply plugin: 'elasticsearch.standalone-test'
|
|
apply plugin: 'elasticsearch.rest-resources'
|
|
|
|
restResources {
|
|
restApi {
|
|
includeCore '_common', 'cluster', 'nodes', 'indices', 'index', 'info'
|
|
includeXpack 'ccr'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
|
testImplementation project(path: xpackModule('ccr'))
|
|
}
|
|
|
|
task restTest(type: RestIntegTestTask) {
|
|
mustRunAfter(precommit)
|
|
}
|
|
|
|
testClusters.restTest {
|
|
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'
|
|
}
|
|
|
|
check.dependsOn restTest
|
|
test.enabled = false
|