2017-12-13 10:19:31 -05:00
|
|
|
dependencies {
|
2018-08-21 20:03:28 -04:00
|
|
|
testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
|
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 }
|
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 {
|
2018-08-21 20:03:28 -04:00
|
|
|
testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
|
2017-12-13 10:19:31 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
integTestCluster {
|
|
|
|
// 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
|
2018-02-23 11:03:17 -05:00
|
|
|
extraConfigFile 'roles.yml', '../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. */
|
|
|
|
setupCommand 'setupUser#test_admin',
|
2018-04-11 11:36:12 -04:00
|
|
|
'bin/elasticsearch-users', 'useradd', 'test_admin', '-p', 'x-pack-test-password', '-r', 'superuser'
|
2017-12-13 10:19:31 -05:00
|
|
|
// Subprojects override the wait condition to work properly with security
|
|
|
|
}
|
|
|
|
|
|
|
|
integTestRunner {
|
2019-02-08 10:23:16 -05:00
|
|
|
def today = new Date().format('yyyy-MM-dd')
|
2019-04-09 14:52:50 -04:00
|
|
|
nonInputProperties.systemProperty 'tests.audit.logfile',
|
2019-01-29 08:53:55 -05:00
|
|
|
"${ -> integTest.nodes[0].homeDir}/logs/${ -> integTest.nodes[0].clusterName }_audit.json"
|
2019-04-09 14:52:50 -04:00
|
|
|
nonInputProperties.systemProperty 'tests.audit.yesterday.logfile',
|
2019-02-08 10:23:16 -05:00
|
|
|
"${ -> integTest.nodes[0].homeDir}/logs/${ -> integTest.nodes[0].clusterName }_audit-${today}.json"
|
2017-12-13 10:19:31 -05:00
|
|
|
}
|
|
|
|
|
2017-12-15 10:42:18 -05:00
|
|
|
runqa {
|
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
|
2018-02-23 11:03:17 -05:00
|
|
|
extraConfigFile 'roles.yml', '../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. */
|
|
|
|
setupCommand 'setupUser#test_admin',
|
2018-04-11 11:36:12 -04:00
|
|
|
'bin/elasticsearch-users', 'useradd', 'test_admin', '-p', 'x-pack-test-password', '-r', 'superuser'
|
2017-12-13 10:19:31 -05:00
|
|
|
}
|
|
|
|
}
|