2022-12-22 07:33:46 +08:00
|
|
|
apply plugin: 'elasticsearch.legacy-java-rest-test'
|
2017-08-04 05:14:24 +08:00
|
|
|
|
|
|
|
dependencies {
|
2022-05-10 14:41:44 +08:00
|
|
|
javaRestTestImplementation project(path: xpackModule('security'))
|
|
|
|
javaRestTestImplementation(testArtifact(project(xpackModule('core'))))
|
2017-08-04 05:14:24 +08:00
|
|
|
}
|
|
|
|
|
2022-05-10 14:41:44 +08:00
|
|
|
tasks.named("javaRestTest").configure {
|
|
|
|
nonInputProperties.systemProperty 'tests.config.dir', testClusters.named("javaRestTest").map(c -> c.singleNode().getConfigDir())
|
2019-11-13 18:14:04 +08:00
|
|
|
systemProperty 'tests.security.manager', 'false'
|
2017-08-04 05:14:24 +08:00
|
|
|
}
|
|
|
|
|
2022-05-10 14:41:44 +08:00
|
|
|
testClusters.matching { it.name == "javaRestTest" }.configureEach {
|
2019-11-13 18:14:04 +08:00
|
|
|
testDistribution = 'DEFAULT'
|
|
|
|
setting 'xpack.security.enabled', 'true'
|
|
|
|
setting 'xpack.license.self_generated.type', 'trial'
|
2021-09-08 19:19:55 +08:00
|
|
|
// Setup passwords doesn't work when there is a password auto-configured on first start
|
|
|
|
setting 'xpack.security.autoconfiguration.enabled', 'false'
|
2019-06-24 17:13:38 +08:00
|
|
|
|
2019-11-13 18:14:04 +08:00
|
|
|
user username: "test_admin", password: "x-pack-test-password"
|
2017-08-04 05:14:24 +08:00
|
|
|
}
|