67 lines
2.3 KiB
Groovy
67 lines
2.3 KiB
Groovy
dependencies {
|
|
testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
|
|
}
|
|
|
|
Project mainProject = project
|
|
|
|
group = "${group}.x-pack.qa.sql.security"
|
|
|
|
// Tests are pushed down to subprojects and will be checked there.
|
|
testingConventions.enabled = false
|
|
|
|
subprojects {
|
|
// Use resources from the parent project in subprojects
|
|
sourceSets {
|
|
test {
|
|
mainProject.sourceSets.test.output.classesDirs.each { dir ->
|
|
output.addClassesDir { dir }
|
|
output.builtBy(mainProject.tasks.testClasses)
|
|
}
|
|
runtimeClasspath += mainProject.sourceSets.test.output
|
|
}
|
|
}
|
|
|
|
processTestResources {
|
|
from mainProject.file('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.enabled', 'true'
|
|
setting 'xpack.license.self_generated.type', 'trial'
|
|
// Setup roles used by tests
|
|
extraConfigFile '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/elasticsearch-users', 'useradd', 'test_admin', '-p', 'x-pack-test-password', '-r', 'superuser'
|
|
// Subprojects override the wait condition to work properly with security
|
|
}
|
|
|
|
integTestRunner {
|
|
def today = new Date().format('yyyy-MM-dd')
|
|
nonInputProperties.systemProperty 'tests.audit.logfile',
|
|
"${ -> integTest.nodes[0].homeDir}/logs/${ -> integTest.nodes[0].clusterName }_audit.json"
|
|
nonInputProperties.systemProperty 'tests.audit.yesterday.logfile',
|
|
"${ -> integTest.nodes[0].homeDir}/logs/${ -> integTest.nodes[0].clusterName }_audit-${today}.json"
|
|
}
|
|
|
|
runqa {
|
|
// Setup auditing so we can use it in some tests
|
|
setting 'xpack.security.audit.enabled', 'true'
|
|
setting 'xpack.security.enabled', 'true'
|
|
setting 'xpack.license.self_generated.type', 'trial'
|
|
// Setup roles used by tests
|
|
extraConfigFile '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/elasticsearch-users', 'useradd', 'test_admin', '-p', 'x-pack-test-password', '-r', 'superuser'
|
|
}
|
|
}
|