2020-02-09 15:48:09 -05:00
|
|
|
import org.elasticsearch.gradle.info.BuildParams
|
2020-02-06 21:55:01 -05:00
|
|
|
import org.elasticsearch.gradle.test.RestIntegTestTask
|
|
|
|
|
|
|
|
apply plugin: 'elasticsearch.testclusters'
|
|
|
|
apply plugin: 'elasticsearch.standalone-test'
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
|
|
|
|
testCompile project(path: xpackModule('autoscaling'), configuration: 'runtime')
|
|
|
|
}
|
|
|
|
|
2020-02-26 09:13:41 -05:00
|
|
|
restResources {
|
|
|
|
restApi {
|
|
|
|
includeXpack 'autoscaling'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-02-06 21:55:01 -05:00
|
|
|
task restTest(type: RestIntegTestTask) {
|
|
|
|
mustRunAfter(precommit)
|
|
|
|
}
|
|
|
|
|
|
|
|
testClusters.restTest {
|
|
|
|
testDistribution = 'DEFAULT'
|
2020-02-09 15:48:09 -05:00
|
|
|
if (BuildParams.isSnapshotBuild() == false) {
|
|
|
|
systemProperty 'es.autoscaling_feature_flag_registered', 'true'
|
|
|
|
}
|
2020-02-06 21:55:01 -05:00
|
|
|
setting 'xpack.autoscaling.enabled', 'true'
|
|
|
|
setting 'xpack.security.enabled', 'true'
|
|
|
|
extraConfigFile 'roles.yml', file('autoscaling-roles.yml')
|
|
|
|
user username: 'autoscaling-admin', password: 'autoscaling-admin-password', role: 'superuser'
|
|
|
|
user username: 'autoscaling-user', password: 'autoscaling-user-password', role: 'autoscaling'
|
|
|
|
}
|
|
|
|
|
|
|
|
check.dependsOn restTest
|
|
|
|
test.enabled = false
|