37 lines
1.3 KiB
Groovy
37 lines
1.3 KiB
Groovy
Project idpFixtureProject = xpackProject("test:idp-fixture")
|
|
evaluationDependsOn(idpFixtureProject.path)
|
|
|
|
apply plugin: 'elasticsearch.standalone-test'
|
|
apply plugin: 'elasticsearch.vagrantsupport'
|
|
|
|
dependencies {
|
|
// "org.elasticsearch.plugin:x-pack-core:${version}" doesn't work with idea because the testArtifacts are also here
|
|
testCompile project(path: xpackModule('core'), configuration: 'default')
|
|
testCompile project(path: xpackModule('security'), configuration: 'testArtifacts')
|
|
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
|
|
}
|
|
|
|
task openLdapFixture {
|
|
dependsOn "vagrantCheckVersion", "virtualboxCheckVersion", idpFixtureProject.up
|
|
}
|
|
|
|
String outputDir = "${project.buildDir}/generated-resources/${project.name}"
|
|
task copyIdpTrust(type: Copy) {
|
|
from idpFixtureProject.file('src/main/resources/certs/idptrust.jks');
|
|
from idpFixtureProject.file('src/main/resources/certs/ca.crt');
|
|
into outputDir
|
|
}
|
|
if (project.rootProject.vagrantSupported) {
|
|
project.sourceSets.test.output.dir(outputDir, builtBy: copyIdpTrust)
|
|
unitTest.dependsOn openLdapFixture
|
|
unitTest.finalizedBy idpFixtureProject.halt
|
|
} else {
|
|
unitTest.enabled = false
|
|
testingConventions.enabled = false
|
|
}
|
|
|
|
namingConventions {
|
|
// integ tests use Tests instead of IT
|
|
skipIntegTestInDisguise = true
|
|
}
|