2018-03-16 12:44:23 -04:00
|
|
|
Project smbFixtureProject = xpackProject("test:smb-fixture")
|
|
|
|
evaluationDependsOn(smbFixtureProject.path)
|
|
|
|
|
|
|
|
apply plugin: 'elasticsearch.vagrantsupport'
|
2018-02-23 07:31:28 -05:00
|
|
|
apply plugin: 'elasticsearch.standalone-test'
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
testCompile project(xpackModule('security'))
|
|
|
|
testCompile project(path: xpackModule('security'), configuration: 'testArtifacts')
|
|
|
|
}
|
|
|
|
|
2018-03-16 12:44:23 -04:00
|
|
|
// add test resources from security, so tests can use example certs
|
2018-02-23 07:31:28 -05:00
|
|
|
sourceSets.test.resources.srcDirs(project(xpackModule('security')).sourceSets.test.resources.srcDirs)
|
2018-03-16 12:44:23 -04:00
|
|
|
compileTestJava.options.compilerArgs << "-Xlint:-deprecation,-rawtypes,-serial,-try,-unchecked"
|
2018-02-23 07:31:28 -05:00
|
|
|
|
2018-03-16 12:44:23 -04:00
|
|
|
// we have to repeat these patterns because the security test resources are effectively in the src of this project
|
2018-02-23 07:31:28 -05:00
|
|
|
forbiddenPatterns {
|
|
|
|
exclude '**/*.key'
|
|
|
|
exclude '**/*.p12'
|
|
|
|
exclude '**/*.der'
|
|
|
|
}
|
|
|
|
|
|
|
|
test {
|
|
|
|
/*
|
|
|
|
* We have to disable setting the number of available processors as tests in the same JVM randomize processors and will step on each
|
|
|
|
* other if we allow them to set the number of available processors as it's set-once in Netty.
|
|
|
|
*/
|
|
|
|
systemProperty 'es.set.netty.runtime.available.processors', 'false'
|
2018-03-16 12:44:23 -04:00
|
|
|
include '**/*IT.class'
|
|
|
|
include '**/*Tests.class'
|
2018-02-23 07:31:28 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// these are just tests, no need to audit
|
|
|
|
thirdPartyAudit.enabled = false
|
2018-03-16 12:44:23 -04:00
|
|
|
|
|
|
|
task smbFixture {
|
|
|
|
dependsOn "vagrantCheckVersion", "virtualboxCheckVersion", smbFixtureProject.up
|
|
|
|
}
|
|
|
|
|
|
|
|
if (project.rootProject.vagrantSupported) {
|
|
|
|
if (project.hasProperty('useExternalAD') == false) {
|
|
|
|
test.dependsOn smbFixture
|
|
|
|
test.finalizedBy smbFixtureProject.halt
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
test.enabled = false
|
|
|
|
}
|