2017-12-13 10:19:31 -05:00
|
|
|
dependencies {
|
2019-06-04 16:50:23 -04:00
|
|
|
testCompile project(':x-pack:plugin:core')
|
2017-12-13 10:19:31 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
Project mainProject = project
|
|
|
|
|
2018-07-19 02:46:58 -04:00
|
|
|
group = "${group}.x-pack.qa.sql.security"
|
|
|
|
|
2019-01-08 06:39:03 -05:00
|
|
|
// Tests are pushed down to subprojects and will be checked there.
|
2019-02-08 10:23:16 -05:00
|
|
|
testingConventions.enabled = false
|
2019-01-08 06:39:03 -05:00
|
|
|
|
2017-12-13 10:19:31 -05:00
|
|
|
subprojects {
|
|
|
|
// Use resources from the parent project in subprojects
|
|
|
|
sourceSets {
|
|
|
|
test {
|
2019-04-08 10:05:12 -04:00
|
|
|
mainProject.sourceSets.test.output.classesDirs.each { dir ->
|
|
|
|
output.addClassesDir { dir }
|
2019-04-18 14:15:34 -04:00
|
|
|
output.builtBy(mainProject.tasks.testClasses)
|
2017-12-13 10:19:31 -05:00
|
|
|
}
|
2019-04-08 10:05:12 -04:00
|
|
|
runtimeClasspath += mainProject.sourceSets.test.output
|
2017-12-13 10:19:31 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-04-08 10:05:12 -04:00
|
|
|
processTestResources {
|
|
|
|
from mainProject.file('src/test/resources')
|
|
|
|
}
|
|
|
|
|
2017-12-13 10:19:31 -05:00
|
|
|
dependencies {
|
2019-06-04 16:50:23 -04:00
|
|
|
testCompile project(":x-pack:plugin:core")
|
2017-12-13 10:19:31 -05:00
|
|
|
}
|
|
|
|
|
2019-06-20 02:21:29 -04:00
|
|
|
testClusters.integTest {
|
2019-07-15 20:53:05 -04:00
|
|
|
testDistribution = 'DEFAULT'
|
2017-12-13 10:19:31 -05:00
|
|
|
// Setup auditing so we can use it in some tests
|
|
|
|
setting 'xpack.security.audit.enabled', 'true'
|
2018-03-21 23:09:44 -04:00
|
|
|
setting 'xpack.security.enabled', 'true'
|
2018-05-03 12:33:08 -04:00
|
|
|
setting 'xpack.license.self_generated.type', 'trial'
|
2017-12-13 10:19:31 -05:00
|
|
|
// Setup roles used by tests
|
2019-06-20 02:21:29 -04:00
|
|
|
extraConfigFile 'roles.yml', mainProject.file('roles.yml')
|
2017-12-13 10:19:31 -05:00
|
|
|
/* Setup the one admin user that we run the tests as.
|
|
|
|
* Tests use "run as" to get different users. */
|
2019-06-20 02:21:29 -04:00
|
|
|
user username: "test_admin", password: "x-pack-test-password"
|
2017-12-13 10:19:31 -05:00
|
|
|
}
|
|
|
|
|
2019-06-20 02:21:29 -04:00
|
|
|
integTest.runner {
|
2019-04-09 14:52:50 -04:00
|
|
|
nonInputProperties.systemProperty 'tests.audit.logfile',
|
2019-06-20 02:21:29 -04:00
|
|
|
"${ -> testClusters.integTest.singleNode().getAuditLog()}"
|
2019-04-09 14:52:50 -04:00
|
|
|
nonInputProperties.systemProperty 'tests.audit.yesterday.logfile',
|
2019-06-20 02:21:29 -04:00
|
|
|
"${ -> testClusters.integTest.singleNode().getAuditLog().getParentFile()}/integTest_audit-${new Date().format('yyyy-MM-dd')}.json"
|
2017-12-13 10:19:31 -05:00
|
|
|
}
|
|
|
|
}
|