mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-03 17:39:15 +00:00
This change disables security for trial licenses unless security is explicitly enabled in the settings. This is done to facilitate users getting started and not having to deal with some of the complexities involved in getting security configured. In order to do this and avoid disabling security for existing users that have gold or platinum licenses, we have to disable security after cluster formation so that the license can be retrieved. relates elastic/x-pack-elasticsearch#4078 Original commit: elastic/x-pack-elasticsearch@96bdb889fc
56 lines
1.8 KiB
Groovy
56 lines
1.8 KiB
Groovy
dependencies {
|
|
testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
|
|
}
|
|
|
|
Project mainProject = project
|
|
|
|
subprojects {
|
|
// Use resources from the parent project in subprojects
|
|
sourceSets {
|
|
test {
|
|
java {
|
|
srcDirs = ["${mainProject.projectDir}/src/test/java"]
|
|
}
|
|
resources {
|
|
srcDirs = ["${mainProject.projectDir}/src/test/resources"]
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
|
|
}
|
|
|
|
integTestCluster {
|
|
// Setup auditing so we can use it in some tests
|
|
setting 'xpack.security.audit.enabled', 'true'
|
|
setting 'xpack.security.audit.outputs', 'logfile'
|
|
setting 'xpack.security.enabled', 'true'
|
|
// Setup roles used by tests
|
|
extraConfigFile 'x-pack/roles.yml', '../roles.yml'
|
|
/* Setup the one admin user that we run the tests as.
|
|
* Tests use "run as" to get different users. */
|
|
setupCommand 'setupUser#test_admin',
|
|
'bin/x-pack/users', 'useradd', 'test_admin', '-p', 'x-pack-test-password', '-r', 'superuser'
|
|
// Subprojects override the wait condition to work properly with security
|
|
}
|
|
|
|
integTestRunner {
|
|
systemProperty 'tests.audit.logfile',
|
|
"${ -> integTest.nodes[0].homeDir}/logs/${ -> integTest.nodes[0].clusterName }_access.log"
|
|
}
|
|
|
|
runqa {
|
|
// Setup auditing so we can use it in some tests
|
|
setting 'xpack.security.audit.enabled', 'true'
|
|
setting 'xpack.security.audit.outputs', 'logfile'
|
|
setting 'xpack.security.enabled', 'true'
|
|
// Setup roles used by tests
|
|
extraConfigFile 'x-pack/roles.yml', '../roles.yml'
|
|
/* Setup the one admin user that we run the tests as.
|
|
* Tests use "run as" to get different users. */
|
|
setupCommand 'setupUser#test_admin',
|
|
'bin/x-pack/users', 'useradd', 'test_admin', '-p', 'x-pack-test-password', '-r', 'superuser'
|
|
}
|
|
}
|