mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-05 20:48:22 +00:00
7e06888bae
Test clusters currently has its own set of logic for dealing with finding different versions of Elasticsearch, downloading them, and extracting them. This commit converts testclusters to use the DistributionDownloadPlugin.
56 lines
2.4 KiB
Groovy
56 lines
2.4 KiB
Groovy
apply plugin: 'elasticsearch.testclusters'
|
|
apply plugin: 'elasticsearch.standalone-rest-test'
|
|
apply plugin: 'elasticsearch.rest-test'
|
|
|
|
dependencies {
|
|
testCompile project(path: xpackModule('core'), configuration: 'default')
|
|
testCompile project(path: xpackModule('security'), configuration: 'testArtifacts')
|
|
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
|
|
testCompile project(path: ':modules:reindex')
|
|
}
|
|
|
|
forbiddenPatterns {
|
|
exclude '**/*.key'
|
|
exclude '**/*.pem'
|
|
exclude '**/*.p12'
|
|
exclude '**/*.jks'
|
|
}
|
|
|
|
File caFile = project.file('src/test/resources/ssl/ca.p12')
|
|
|
|
testClusters.integTest {
|
|
testDistribution = 'DEFAULT'
|
|
// Whitelist reindexing from the local node so we can test it.
|
|
extraConfigFile 'http.key', file('src/test/resources/ssl/http.key')
|
|
extraConfigFile 'http.crt', file('src/test/resources/ssl/http.crt')
|
|
extraConfigFile 'ca.p12', caFile
|
|
setting 'reindex.remote.whitelist', '127.0.0.1:*'
|
|
setting 'xpack.ilm.enabled', 'false'
|
|
setting 'xpack.security.enabled', 'true'
|
|
setting 'xpack.ml.enabled', 'false'
|
|
setting 'xpack.license.self_generated.type', 'trial'
|
|
setting 'xpack.security.http.ssl.enabled', 'true'
|
|
setting 'xpack.security.http.ssl.certificate', 'http.crt'
|
|
setting 'xpack.security.http.ssl.key', 'http.key'
|
|
setting 'xpack.security.http.ssl.key_passphrase', 'http-password'
|
|
setting 'reindex.ssl.truststore.path', 'ca.p12'
|
|
setting 'reindex.ssl.truststore.password', 'password'
|
|
|
|
// Workaround for JDK-8212885
|
|
rootProject.globalInfo.ready {
|
|
if (project.ext.runtimeJavaVersion.isJava12Compatible() == false) {
|
|
setting 'reindex.ssl.supported_protocols', 'TLSv1.2'
|
|
}
|
|
}
|
|
|
|
extraConfigFile 'roles.yml', file('roles.yml')
|
|
user username: "test_admin", password: 'x-pack-test-password', role: "superuser"
|
|
user username: "powerful_user", password: 'x-pack-test-password', role: "superuser"
|
|
user username: "minimal_user", password: 'x-pack-test-password', role: "minimal"
|
|
user username: "minimal_with_task_user", password: 'x-pack-test-password', role: "minimal_with_task"
|
|
user username: "readonly_user", password: 'x-pack-test-password', role: "readonly"
|
|
user username: "dest_only_user", password: 'x-pack-test-password', role: "dest_only"
|
|
user username: "can_not_see_hidden_docs_user", password: 'x-pack-test-password', role: "can_not_see_hidden_docs"
|
|
user username: "can_not_see_hidden_fields_user", password: 'x-pack-test-password', role: "can_not_see_hidden_fields"
|
|
}
|