2018-10-31 14:49:29 -04:00
|
|
|
import org.elasticsearch.gradle.test.RestIntegTestTask
|
|
|
|
|
2019-06-13 05:18:55 -04:00
|
|
|
apply plugin: 'elasticsearch.testclusters'
|
2018-10-31 14:49:29 -04:00
|
|
|
apply plugin: 'elasticsearch.standalone-test'
|
|
|
|
|
|
|
|
dependencies {
|
2019-11-14 06:01:23 -05:00
|
|
|
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
|
|
|
|
testCompile project(path: xpackModule('ilm'), configuration: 'runtime')
|
2018-10-31 14:49:29 -04:00
|
|
|
}
|
|
|
|
|
2020-02-26 09:13:41 -05:00
|
|
|
restResources {
|
|
|
|
restApi {
|
2020-03-19 13:28:59 -04:00
|
|
|
includeCore '_common', 'cluster', 'indices', 'index', 'snapshot'
|
2020-02-26 09:13:41 -05:00
|
|
|
includeXpack 'ilm', 'slm'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-31 14:49:29 -04:00
|
|
|
def clusterCredentials = [username: System.getProperty('tests.rest.cluster.username', 'test_admin'),
|
2019-11-14 06:01:23 -05:00
|
|
|
password: System.getProperty('tests.rest.cluster.password', 'x-pack-test-password')]
|
2018-10-31 14:49:29 -04:00
|
|
|
|
2019-06-13 05:18:55 -04:00
|
|
|
task restTest(type: RestIntegTestTask) {
|
2019-11-14 06:01:23 -05:00
|
|
|
mustRunAfter(precommit)
|
|
|
|
runner {
|
|
|
|
systemProperty 'tests.rest.cluster.username', clusterCredentials.username
|
|
|
|
systemProperty 'tests.rest.cluster.password', clusterCredentials.password
|
|
|
|
}
|
2018-10-31 14:49:29 -04:00
|
|
|
}
|
|
|
|
|
2019-06-13 05:18:55 -04:00
|
|
|
testClusters.restTest {
|
2019-11-14 06:01:23 -05:00
|
|
|
testDistribution = 'DEFAULT'
|
|
|
|
setting 'xpack.ilm.enabled', 'true'
|
|
|
|
setting 'xpack.ml.enabled', 'false'
|
|
|
|
setting 'xpack.monitoring.enabled', 'false'
|
|
|
|
setting 'xpack.security.enabled', 'true'
|
|
|
|
setting 'xpack.license.self_generated.type', 'trial'
|
|
|
|
user clusterCredentials
|
2018-10-31 14:49:29 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
check.dependsOn restTest
|
2019-04-09 14:52:50 -04:00
|
|
|
test.enabled = false
|