elasticsearch/x-pack/plugin/stack/qa/rest/build.gradle

37 lines
1.1 KiB
Groovy

apply plugin: 'elasticsearch.internal-yaml-rest-test'
apply plugin: 'elasticsearch.yaml-rest-compat-test'
dependencies {
yamlRestTestImplementation(testArtifact(project(xpackModule('core'))))
}
restResources {
restApi {
include '_common', 'cluster', 'indices', 'index', 'snapshot', 'ilm', 'slm', 'stack', 'indices'
}
}
def clusterCredentials = [
username: providers.systemProperty('tests.rest.cluster.username')
.orElse('test_admin')
.forUseAtConfigurationTime()
.get(),
password: providers.systemProperty('tests.rest.cluster.password')
.orElse('x-pack-test-password')
.forUseAtConfigurationTime()
.get()
]
tasks.withType(Test).configureEach {
systemProperty 'tests.rest.cluster.username', clusterCredentials.username
systemProperty 'tests.rest.cluster.password', clusterCredentials.password
}
testClusters.all {
testDistribution = 'DEFAULT'
setting 'xpack.ml.enabled', 'false'
setting 'xpack.security.enabled', 'true'
setting 'xpack.license.self_generated.type', 'trial'
user clusterCredentials
}