Move tasks in build scripts to task avoidance api (#64046)
- Some trivial cleanup on build scripts - Change task referencing in build scripts to use task avoidance api where replacement is trivial.
This commit is contained in:
parent
95937bf5e8
commit
810e7ff6b0
|
@ -23,10 +23,10 @@ apply plugin: 'elasticsearch.build'
|
|||
apply plugin: 'application'
|
||||
mainClassName = 'org.openjdk.jmh.Main'
|
||||
|
||||
assemble.enabled = false
|
||||
tasks.named("assemble").configure { enabled = false }
|
||||
archivesBaseName = 'elasticsearch-benchmarks'
|
||||
|
||||
test.enabled = false
|
||||
tasks.named("test").configure { enabled = false }
|
||||
|
||||
dependencies {
|
||||
api( project(":server")) {
|
||||
|
@ -43,27 +43,31 @@ dependencies {
|
|||
|
||||
// enable the JMH's BenchmarkProcessor to generate the final benchmark classes
|
||||
// needs to be added separately otherwise Gradle will quote it and javac will fail
|
||||
compileJava.options.compilerArgs.addAll(["-processor", "org.openjdk.jmh.generators.BenchmarkProcessor"])
|
||||
tasks.named("compileJava").configure {
|
||||
options.compilerArgs.addAll(["-processor", "org.openjdk.jmh.generators.BenchmarkProcessor"])
|
||||
}
|
||||
|
||||
run.executable = "${BuildParams.runtimeJavaHome}/bin/java"
|
||||
tasks.named("run").configure { executable = "${BuildParams.runtimeJavaHome}/bin/java"}
|
||||
|
||||
// classes generated by JMH can use all sorts of forbidden APIs but we have no influence at all and cannot exclude these classes
|
||||
disableTasks('forbiddenApisMain')
|
||||
|
||||
// No licenses for our benchmark deps (we don't ship benchmarks)
|
||||
tasks.named("dependencyLicenses").configure { it.enabled = false }
|
||||
dependenciesInfo.enabled = false
|
||||
tasks.named("dependencyLicenses").configure { enabled = false }
|
||||
tasks.named("dependenciesInfo").configure { enabled = false }
|
||||
|
||||
thirdPartyAudit.ignoreViolations(
|
||||
// these classes intentionally use JDK internal API (and this is ok since the project is maintained by Oracle employees)
|
||||
'org.openjdk.jmh.profile.AbstractHotspotProfiler',
|
||||
'org.openjdk.jmh.profile.HotspotThreadProfiler',
|
||||
'org.openjdk.jmh.profile.HotspotClassloadingProfiler',
|
||||
'org.openjdk.jmh.profile.HotspotCompilationProfiler',
|
||||
'org.openjdk.jmh.profile.HotspotMemoryProfiler',
|
||||
'org.openjdk.jmh.profile.HotspotRuntimeProfiler',
|
||||
'org.openjdk.jmh.util.Utils'
|
||||
)
|
||||
tasks.named("thirdPartyAudit").configure {
|
||||
ignoreViolations(
|
||||
// these classes intentionally use JDK internal API (and this is ok since the project is maintained by Oracle employees)
|
||||
'org.openjdk.jmh.profile.AbstractHotspotProfiler',
|
||||
'org.openjdk.jmh.profile.HotspotThreadProfiler',
|
||||
'org.openjdk.jmh.profile.HotspotClassloadingProfiler',
|
||||
'org.openjdk.jmh.profile.HotspotCompilationProfiler',
|
||||
'org.openjdk.jmh.profile.HotspotMemoryProfiler',
|
||||
'org.openjdk.jmh.profile.HotspotRuntimeProfiler',
|
||||
'org.openjdk.jmh.util.Utils'
|
||||
)
|
||||
}
|
||||
|
||||
spotless {
|
||||
java {
|
||||
|
|
|
@ -389,7 +389,7 @@ allprojects {
|
|||
tasks.named('eclipse') { dependsOn 'cleanEclipse', 'copyEclipseSettings' }
|
||||
}
|
||||
|
||||
wrapper {
|
||||
tasks.named("wrapper").configure {
|
||||
distributionType = 'ALL'
|
||||
doLast {
|
||||
final DistributionLocator locator = new DistributionLocator()
|
||||
|
@ -414,10 +414,10 @@ gradle.projectsEvaluated {
|
|||
*/
|
||||
if (project.name.equals('qa') || project.path.contains(':qa:')) {
|
||||
maybeConfigure(project.tasks, 'assemble') {
|
||||
it.enabled = false
|
||||
enabled = false
|
||||
}
|
||||
maybeConfigure(project.tasks, 'dependenciesInfo') {
|
||||
it.enabled = false
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ def generateVersionProperties = tasks.register("generateVersionProperties", Writ
|
|||
properties(props)
|
||||
}
|
||||
|
||||
processResources {
|
||||
tasks.named("processResources").configure {
|
||||
from(generateVersionProperties)
|
||||
}
|
||||
|
||||
|
@ -132,7 +132,9 @@ if (project == rootProject) {
|
|||
runtimeOnly project('reaper')
|
||||
}
|
||||
// only run tests as build-tools
|
||||
test.enabled = false
|
||||
tasks.named("test").configure {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
|
@ -146,19 +148,29 @@ if (project != rootProject) {
|
|||
apply plugin: 'elasticsearch.publish'
|
||||
|
||||
// groovydoc succeeds, but has some weird internal exception...
|
||||
groovydoc.enabled = false
|
||||
tasks.named("groovydoc").configure {
|
||||
enabled = false
|
||||
}
|
||||
|
||||
// build-tools is not ready for primetime with these...
|
||||
tasks.named("dependencyLicenses").configure { it.enabled = false }
|
||||
dependenciesInfo.enabled = false
|
||||
tasks.named("dependencyLicenses").configure { enabled = false }
|
||||
tasks.named("dependenciesInfo").configure {enabled = false }
|
||||
disableTasks('forbiddenApisMain', 'forbiddenApisTest', 'forbiddenApisIntegTest', 'forbiddenApisTestFixtures')
|
||||
jarHell.enabled = false
|
||||
thirdPartyAudit.enabled = false
|
||||
tasks.named("jarHell").configure {
|
||||
enabled = false
|
||||
}
|
||||
tasks.named("thirdPartyAudit").configure {
|
||||
enabled = false
|
||||
}
|
||||
if (org.elasticsearch.gradle.info.BuildParams.inFipsJvm) {
|
||||
// We don't support running gradle with a JVM that is in FIPS 140 mode, so we don't test it.
|
||||
// WaitForHttpResourceTests tests would fail as they use JKS/PKCS12 keystores
|
||||
test.enabled = false
|
||||
testingConventions.enabled = false
|
||||
tasks.named("test").configure {
|
||||
enabled = false;
|
||||
}
|
||||
tasks.named("testingConventions").configure {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
|
||||
configurations.register("distribution")
|
||||
|
@ -185,7 +197,7 @@ if (project != rootProject) {
|
|||
}
|
||||
|
||||
// for external projects we want to remove the marker file indicating we are running the Elasticsearch project
|
||||
processResources {
|
||||
tasks.named("processResources").configure {
|
||||
exclude 'buildSrc.marker'
|
||||
into('META-INF') {
|
||||
from configurations.reaper
|
||||
|
@ -204,7 +216,7 @@ if (project != rootProject) {
|
|||
}
|
||||
}
|
||||
|
||||
forbiddenPatterns {
|
||||
tasks.named("forbiddenPatterns").configure {
|
||||
exclude '**/*.wav'
|
||||
exclude '**/*.p12'
|
||||
exclude '**/*.jks'
|
||||
|
@ -214,7 +226,7 @@ if (project != rootProject) {
|
|||
exclude '**/*.bcfks'
|
||||
}
|
||||
|
||||
testingConventions {
|
||||
tasks.named("testingConventions") {
|
||||
naming.clear()
|
||||
naming {
|
||||
Tests {
|
||||
|
@ -234,7 +246,7 @@ if (project != rootProject) {
|
|||
testClassesDirs = sourceSets.integTest.output.classesDirs
|
||||
classpath = sourceSets.integTest.runtimeClasspath
|
||||
}
|
||||
check.dependsOn("integTest")
|
||||
tasks.named("check").configure { dependsOn("integTest") }
|
||||
|
||||
// for now we hardcode the tests for our build to use the gradle jvm.
|
||||
tasks.withType(Test).configureEach {
|
||||
|
@ -246,7 +258,9 @@ if (project != rootProject) {
|
|||
* comes from the java-gradle-plugin.
|
||||
*/
|
||||
afterEvaluate {
|
||||
generatePomFileForPluginMavenPublication.enabled = false
|
||||
tasks.named("generatePomFileForPluginMavenPublication").configure {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
|
||||
publishing.publications.named("nebula").configure {
|
||||
|
|
|
@ -42,7 +42,7 @@ class DocsTestPlugin implements Plugin<Project> {
|
|||
project.testClusters.integTest.testDistribution = distribution.toUpperCase()
|
||||
project.testClusters.integTest.nameCustomization = { it.replace("integTest", "node") }
|
||||
// Docs are published separately so no need to assemble
|
||||
project.tasks.assemble.enabled = false
|
||||
project.tasks.named("assemble").configure {enabled = false }
|
||||
Map<String, String> commonDefaultSubstitutions = [
|
||||
/* These match up with the asciidoc syntax for substitutions but
|
||||
* the values may differ. In particular {version} needs to resolve
|
||||
|
|
|
@ -108,6 +108,22 @@ class PluginBuildPlugin implements Plugin<Project> {
|
|||
}
|
||||
}
|
||||
|
||||
// We've ported this from multiple build scripts where we see this pattern into
|
||||
// an extension method as a first step of consolidation.
|
||||
// We might want to port this into a general pattern later on.
|
||||
project.ext.addQaCheckDependencies = {
|
||||
project.afterEvaluate {
|
||||
// let check depend on check tasks of qa sub-projects
|
||||
def checkTaskProvider = project.tasks.named("check")
|
||||
def qaSubproject = project.subprojects.find { it.path == project.path + ":qa" }
|
||||
if(qaSubproject) {
|
||||
qaSubproject.subprojects.each {p ->
|
||||
checkTaskProvider.configure {it.dependsOn(p.path + ":check") }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
project.tasks.named('testingConventions').configure {
|
||||
naming.clear()
|
||||
naming {
|
||||
|
@ -125,7 +141,7 @@ class PluginBuildPlugin implements Plugin<Project> {
|
|||
.extendsFrom(project.configurations.getByName('runtimeClasspath'))
|
||||
// allow running ES with this plugin in the foreground of a build
|
||||
project.tasks.register('run', RunTask) {
|
||||
dependsOn(project.tasks.bundlePlugin)
|
||||
dependsOn(project.tasks.named("bundlePlugin"))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -23,13 +23,13 @@ apply plugin: 'application'
|
|||
group = 'org.elasticsearch.client'
|
||||
|
||||
// Not published so no need to assemble
|
||||
assemble.enabled = true
|
||||
tasks.named("assemble").configure { enabled = true }
|
||||
|
||||
archivesBaseName = 'client-benchmarks'
|
||||
mainClassName = 'org.elasticsearch.client.benchmark.BenchmarkMain'
|
||||
|
||||
// never try to invoke tests on the benchmark project - there aren't any
|
||||
test.enabled = false
|
||||
tasks.named("test").configure {enabled = false }
|
||||
|
||||
dependencies {
|
||||
api 'org.apache.commons:commons-math3:3.2'
|
||||
|
@ -41,5 +41,5 @@ dependencies {
|
|||
}
|
||||
|
||||
// No licenses for our benchmark deps (we don't ship benchmarks)
|
||||
tasks.named("dependencyLicenses").configure { it.enabled = false }
|
||||
dependenciesInfo.enabled = false
|
||||
tasks.named("dependencyLicenses").configure { enabled = false }
|
||||
tasks.named("dependenciesInfo").configure{enabled = false }
|
||||
|
|
|
@ -28,10 +28,8 @@ esplugin {
|
|||
}
|
||||
|
||||
// Not published so no need to assemble
|
||||
assemble.enabled = false
|
||||
|
||||
tasks.named("dependencyLicenses").configure { it.enabled = false }
|
||||
dependenciesInfo.enabled = false
|
||||
|
||||
tasks.named("assemble").configure { enabled = false }
|
||||
tasks.named("dependencyLicenses").configure { enabled = false }
|
||||
tasks.named("dependenciesInfo").configure { enabled = false }
|
||||
// no unit tests
|
||||
test.enabled = false
|
||||
tasks.named("test").configure { enabled = false }
|
||||
|
|
|
@ -72,19 +72,22 @@ File nodeCert = file("./testnode.crt")
|
|||
File nodeTrustStore = file("./testnode.jks")
|
||||
File pkiTrustCert = file("./src/test/resources/org/elasticsearch/client/security/delegate_pki/testRootCA.crt")
|
||||
|
||||
integTest {
|
||||
tasks.named("integTest").configure {
|
||||
systemProperty 'tests.rest.async', 'false'
|
||||
systemProperty 'tests.rest.cluster.username', System.getProperty('tests.rest.cluster.username', 'test_user')
|
||||
systemProperty 'tests.rest.cluster.password', System.getProperty('tests.rest.cluster.password', 'test-password')
|
||||
}
|
||||
|
||||
// Requires https://github.com/elastic/elasticsearch/pull/64403 to have this moved to task avoidance api.
|
||||
RestIntegTestTask asyncIntegTest = tasks.create("asyncIntegTest", RestIntegTestTask) {
|
||||
systemProperty 'tests.rest.async', 'true'
|
||||
systemProperty 'tests.rest.cluster.username', System.getProperty('tests.rest.cluster.username', 'test_user')
|
||||
systemProperty 'tests.rest.cluster.password', System.getProperty('tests.rest.cluster.password', 'test-password')
|
||||
}
|
||||
|
||||
check.dependsOn(asyncIntegTest)
|
||||
tasks.named("check").configure {
|
||||
dependsOn(asyncIntegTest)
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testDistribution = 'DEFAULT'
|
||||
|
|
|
@ -48,7 +48,7 @@ tasks.withType(CheckForbiddenApis).configureEach {
|
|||
replaceSignatureFiles('jdk-signatures', 'http-signatures')
|
||||
}
|
||||
|
||||
forbiddenPatterns {
|
||||
tasks.named("forbiddenPatterns").configure {
|
||||
exclude '**/*.der'
|
||||
}
|
||||
|
||||
|
@ -60,9 +60,11 @@ tasks.named('forbiddenApisTest').configure {
|
|||
|
||||
// JarHell is part of es server, which we don't want to pull in
|
||||
// TODO: Not anymore. Now in :libs:elasticsearch-core
|
||||
jarHell.enabled = false
|
||||
tasks.named("jarHell").configure {
|
||||
enabled = false
|
||||
}
|
||||
|
||||
testingConventions {
|
||||
tasks.named("testingConventions").configure {
|
||||
naming.clear()
|
||||
naming {
|
||||
Tests {
|
||||
|
@ -71,16 +73,18 @@ testingConventions {
|
|||
}
|
||||
}
|
||||
|
||||
thirdPartyAudit.ignoreMissingClasses(
|
||||
//commons-logging optional dependencies
|
||||
'org.apache.avalon.framework.logger.Logger',
|
||||
'org.apache.log.Hierarchy',
|
||||
'org.apache.log.Logger',
|
||||
'org.apache.log4j.Category',
|
||||
'org.apache.log4j.Level',
|
||||
'org.apache.log4j.Logger',
|
||||
'org.apache.log4j.Priority',
|
||||
//commons-logging provided dependencies
|
||||
'javax.servlet.ServletContextEvent',
|
||||
'javax.servlet.ServletContextListener'
|
||||
)
|
||||
tasks.named("thirdPartyAudit").configure {
|
||||
ignoreMissingClasses(
|
||||
//commons-logging optional dependencies
|
||||
'org.apache.avalon.framework.logger.Logger',
|
||||
'org.apache.log.Hierarchy',
|
||||
'org.apache.log.Logger',
|
||||
'org.apache.log4j.Category',
|
||||
'org.apache.log4j.Level',
|
||||
'org.apache.log4j.Logger',
|
||||
'org.apache.log4j.Priority',
|
||||
//commons-logging provided dependencies
|
||||
'javax.servlet.ServletContextEvent',
|
||||
'javax.servlet.ServletContextListener'
|
||||
)
|
||||
}
|
||||
|
|
|
@ -60,9 +60,9 @@ tasks.named("dependencyLicenses").configure {
|
|||
|
||||
// JarHell is part of es server, which we don't want to pull in
|
||||
// TODO: Not anymore. Now in :libs:elasticsearch-core
|
||||
jarHell.enabled = false
|
||||
tasks.named("jarHell").configure { enabled = false }
|
||||
|
||||
testingConventions {
|
||||
tasks.named("testingConventions").configure {
|
||||
naming.clear()
|
||||
naming {
|
||||
Tests {
|
||||
|
@ -71,16 +71,18 @@ testingConventions {
|
|||
}
|
||||
}
|
||||
|
||||
thirdPartyAudit.ignoreMissingClasses(
|
||||
//commons-logging optional dependencies
|
||||
'org.apache.avalon.framework.logger.Logger',
|
||||
'org.apache.log.Hierarchy',
|
||||
'org.apache.log.Logger',
|
||||
'org.apache.log4j.Category',
|
||||
'org.apache.log4j.Level',
|
||||
'org.apache.log4j.Logger',
|
||||
'org.apache.log4j.Priority',
|
||||
//commons-logging provided dependencies
|
||||
'javax.servlet.ServletContextEvent',
|
||||
'javax.servlet.ServletContextListener'
|
||||
)
|
||||
tasks.named("thirdPartyAudit").configure {
|
||||
ignoreMissingClasses(
|
||||
//commons-logging optional dependencies
|
||||
'org.apache.avalon.framework.logger.Logger',
|
||||
'org.apache.log.Hierarchy',
|
||||
'org.apache.log.Logger',
|
||||
'org.apache.log4j.Category',
|
||||
'org.apache.log4j.Level',
|
||||
'org.apache.log4j.Logger',
|
||||
'org.apache.log4j.Priority',
|
||||
//commons-logging provided dependencies
|
||||
'javax.servlet.ServletContextEvent',
|
||||
'javax.servlet.ServletContextListener'
|
||||
)
|
||||
}
|
|
@ -48,9 +48,9 @@ tasks.named('forbiddenApisTest').configure {
|
|||
jarHell.enabled = false
|
||||
|
||||
// TODO: should we have licenses for our test deps?
|
||||
tasks.named("dependencyLicenses").configure { it.enabled = false }
|
||||
dependenciesInfo.enabled = false
|
||||
tasks.named("dependencyLicenses").configure { enabled = false }
|
||||
tasks.named("dependenciesInfo").configure { enabled = false }
|
||||
|
||||
//we aren't releasing this jar
|
||||
thirdPartyAudit.enabled = false
|
||||
test.enabled = false
|
||||
tasks.named("thirdPartyAudit").configure { enabled = false }
|
||||
tasks.named("test").configure { enabled = false }
|
||||
|
|
|
@ -26,11 +26,7 @@ apply plugin: 'elasticsearch.publish'
|
|||
|
||||
group = "org.elasticsearch.distribution.integ-test-zip"
|
||||
|
||||
integTest {
|
||||
dependsOn assemble
|
||||
}
|
||||
|
||||
processTestResources {
|
||||
tasks.named("processTestResources").configure {
|
||||
inputs.properties(project(':distribution').restTestExpansions)
|
||||
MavenFilteringHack.filter(it, project(':distribution').restTestExpansions)
|
||||
}
|
||||
|
@ -48,7 +44,8 @@ publishing {
|
|||
}
|
||||
}
|
||||
|
||||
integTest {
|
||||
tasks.named("integTest").configure {
|
||||
dependsOn "assemble"
|
||||
/*
|
||||
* There are two unique things going on here:
|
||||
* 1. These tests can be run against an external cluster with
|
||||
|
@ -56,7 +53,7 @@ integTest {
|
|||
* 2. *One* of these tests is incompatible with that and should be skipped
|
||||
* when running against an external cluster.
|
||||
*/
|
||||
if (System.getProperty("tests.rest.cluster") == null) {
|
||||
if (project.providers.systemProperty("tests.rest.cluster").forUseAtConfigurationTime().isPresent()) {
|
||||
nonInputProperties.systemProperty 'tests.logfile',
|
||||
"${-> testClusters.integTest.singleNode().getServerLog()}"
|
||||
} else {
|
||||
|
|
|
@ -259,7 +259,7 @@ project.rootProject.subprojects.findAll { it.parent.path == ':modules' }.each {
|
|||
licensesDir licenses
|
||||
source module.file('src/main/java')
|
||||
}
|
||||
buildOssNotice.configure {
|
||||
buildOssNoticeTaskProvider.configure {
|
||||
licensesDir licenses
|
||||
source module.file('src/main/java')
|
||||
}
|
||||
|
|
|
@ -310,8 +310,8 @@ for (final Architecture architecture : Architecture.values()) {
|
|||
// We build the images used in compose locally, but the pull command insists on using a repository
|
||||
// thus we must disable it to prevent it from doing so.
|
||||
// Everything will still be pulled since we will build the local images on a pull
|
||||
if (tasks.findByName("composePull")) {
|
||||
tasks.composePull.enabled = false
|
||||
tasks.named("composePull").configure {
|
||||
enabled = false
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -2,7 +2,7 @@ import org.elasticsearch.gradle.DockerBase
|
|||
|
||||
apply plugin: 'base'
|
||||
|
||||
task buildUbiDockerBuildContext(type: Tar) {
|
||||
tasks.register("buildUbiDockerBuildContext", Tar) {
|
||||
archiveExtension = 'tar.gz'
|
||||
compression = Compression.GZIP
|
||||
archiveClassifier = "docker-build-context"
|
||||
|
@ -10,4 +10,4 @@ task buildUbiDockerBuildContext(type: Tar) {
|
|||
with dockerBuildContext(null, false, DockerBase.UBI, false)
|
||||
}
|
||||
|
||||
assemble.dependsOn buildUbiDockerBuildContext
|
||||
tasks.named("assemble").configure { dependsOn("buildUbiDockerBuildContext") }
|
||||
|
|
|
@ -7,7 +7,6 @@ tasks.named('forbiddenApisMain').configure {
|
|||
replaceSignatureFiles 'jdk-signatures'
|
||||
}
|
||||
|
||||
test.enabled = false
|
||||
javadoc.enabled = false
|
||||
loggerUsageCheck.enabled = false
|
||||
jarHell.enabled = false
|
||||
["test", "javadoc", "loggerUsageCheck", "jarHell"].each {
|
||||
tasks.named(it).configure { enabled = false }
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ tasks.withType(CheckForbiddenApis).configureEach {
|
|||
replaceSignatureFiles 'jdk-signatures'
|
||||
}
|
||||
|
||||
testingConventions {
|
||||
tasks.named("testingConventions").configure {
|
||||
naming.clear()
|
||||
naming {
|
||||
Tests {
|
||||
|
@ -42,6 +42,6 @@ testingConventions {
|
|||
}
|
||||
}
|
||||
|
||||
javadoc.enabled = false
|
||||
loggerUsageCheck.enabled = false
|
||||
jarHell.enabled = false
|
||||
["javadoc", "loggerUsageCheck", "jarHell"].each { tsk ->
|
||||
tasks.named(tsk).configure { enabled = false }
|
||||
}
|
|
@ -35,7 +35,7 @@ tasks.named("dependencyLicenses").configure {
|
|||
mapping from: /bc.*/, to: 'bouncycastle'
|
||||
}
|
||||
|
||||
test {
|
||||
tasks.named("test").configure {
|
||||
// TODO: find a way to add permissions for the tests in this module
|
||||
systemProperty 'tests.security.manager', 'false'
|
||||
}
|
||||
|
@ -52,17 +52,19 @@ test {
|
|||
* sun.security.provider.SecureRandom
|
||||
*
|
||||
*/
|
||||
thirdPartyAudit.ignoreViolations(
|
||||
'org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider$CoreSecureRandom',
|
||||
'org.bouncycastle.jcajce.provider.ProvSunTLSKDF',
|
||||
'org.bouncycastle.jcajce.provider.ProvSunTLSKDF$BaseTLSKeyGeneratorSpi',
|
||||
'org.bouncycastle.jcajce.provider.ProvSunTLSKDF$TLSKeyMaterialGenerator',
|
||||
'org.bouncycastle.jcajce.provider.ProvSunTLSKDF$TLSKeyMaterialGenerator$2',
|
||||
'org.bouncycastle.jcajce.provider.ProvSunTLSKDF$TLSMasterSecretGenerator',
|
||||
'org.bouncycastle.jcajce.provider.ProvSunTLSKDF$TLSMasterSecretGenerator$2',
|
||||
'org.bouncycastle.jcajce.provider.ProvSunTLSKDF$TLSPRFKeyGenerator',
|
||||
'org.bouncycastle.jcajce.provider.ProvSunTLSKDF$TLSRsaPreMasterSecretGenerator',
|
||||
'org.bouncycastle.jcajce.provider.ProvSunTLSKDF$TLSRsaPreMasterSecretGenerator$2',
|
||||
'org.bouncycastle.jcajce.provider.ProvSunTLSKDF$TLSExtendedMasterSecretGenerator',
|
||||
'org.bouncycastle.jcajce.provider.ProvSunTLSKDF$TLSExtendedMasterSecretGenerator$2'
|
||||
)
|
||||
tasks.named("thirdPartyAudit").configure {
|
||||
ignoreViolations(
|
||||
'org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider$CoreSecureRandom',
|
||||
'org.bouncycastle.jcajce.provider.ProvSunTLSKDF',
|
||||
'org.bouncycastle.jcajce.provider.ProvSunTLSKDF$BaseTLSKeyGeneratorSpi',
|
||||
'org.bouncycastle.jcajce.provider.ProvSunTLSKDF$TLSKeyMaterialGenerator',
|
||||
'org.bouncycastle.jcajce.provider.ProvSunTLSKDF$TLSKeyMaterialGenerator$2',
|
||||
'org.bouncycastle.jcajce.provider.ProvSunTLSKDF$TLSMasterSecretGenerator',
|
||||
'org.bouncycastle.jcajce.provider.ProvSunTLSKDF$TLSMasterSecretGenerator$2',
|
||||
'org.bouncycastle.jcajce.provider.ProvSunTLSKDF$TLSPRFKeyGenerator',
|
||||
'org.bouncycastle.jcajce.provider.ProvSunTLSKDF$TLSRsaPreMasterSecretGenerator',
|
||||
'org.bouncycastle.jcajce.provider.ProvSunTLSKDF$TLSRsaPreMasterSecretGenerator$2',
|
||||
'org.bouncycastle.jcajce.provider.ProvSunTLSKDF$TLSExtendedMasterSecretGenerator',
|
||||
'org.bouncycastle.jcajce.provider.ProvSunTLSKDF$TLSExtendedMasterSecretGenerator$2'
|
||||
)
|
||||
}
|
|
@ -28,4 +28,4 @@ tasks.named("check").configure {
|
|||
dependsOn(bwcTestSnapshots)
|
||||
}
|
||||
|
||||
tasks.findByName("test")?.enabled = false
|
||||
tasks.matching{ it.name.equals("test") }.configureEach {enabled = false}
|
||||
|
|
|
@ -187,7 +187,7 @@ subprojects {
|
|||
}
|
||||
}
|
||||
|
||||
precommit.dependsOn 'spotlessJavaCheck'
|
||||
tasks.named("precommit").configure {dependsOn 'spotlessJavaCheck' }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,15 +39,17 @@ tasks.named('forbiddenApisMain').configure {
|
|||
replaceSignatureFiles 'jdk-signatures'
|
||||
}
|
||||
|
||||
thirdPartyAudit.ignoreMissingClasses(
|
||||
// from log4j
|
||||
'org/osgi/framework/AdaptPermission',
|
||||
'org/osgi/framework/AdminPermission',
|
||||
'org/osgi/framework/Bundle',
|
||||
'org/osgi/framework/BundleActivator',
|
||||
'org/osgi/framework/BundleContext',
|
||||
'org/osgi/framework/BundleEvent',
|
||||
'org/osgi/framework/SynchronousBundleListener',
|
||||
'org/osgi/framework/wiring/BundleWire',
|
||||
'org/osgi/framework/wiring/BundleWiring'
|
||||
)
|
||||
tasks.named("thirdPartyAudit").configure {
|
||||
ignoreMissingClasses(
|
||||
// from log4j
|
||||
'org/osgi/framework/AdaptPermission',
|
||||
'org/osgi/framework/AdminPermission',
|
||||
'org/osgi/framework/Bundle',
|
||||
'org/osgi/framework/BundleActivator',
|
||||
'org/osgi/framework/BundleContext',
|
||||
'org/osgi/framework/BundleEvent',
|
||||
'org/osgi/framework/SynchronousBundleListener',
|
||||
'org/osgi/framework/wiring/BundleWire',
|
||||
'org/osgi/framework/wiring/BundleWiring'
|
||||
)
|
||||
}
|
||||
|
|
|
@ -45,11 +45,13 @@ tasks.named('forbiddenApisMain').configure {
|
|||
replaceSignatureFiles 'jdk-signatures'
|
||||
}
|
||||
|
||||
thirdPartyAudit.ignoreMissingClasses(
|
||||
// from com.fasterxml.jackson.dataformat.yaml.YAMLMapper (jackson-dataformat-yaml)
|
||||
'com.fasterxml.jackson.databind.ObjectMapper',
|
||||
'com.fasterxml.jackson.databind.cfg.MapperBuilder'
|
||||
)
|
||||
tasks.named("thirdPartyAudit").configure {
|
||||
ignoreMissingClasses(
|
||||
// from com.fasterxml.jackson.dataformat.yaml.YAMLMapper (jackson-dataformat-yaml)
|
||||
'com.fasterxml.jackson.databind.ObjectMapper',
|
||||
'com.fasterxml.jackson.databind.cfg.MapperBuilder'
|
||||
)
|
||||
}
|
||||
|
||||
tasks.named("dependencyLicenses").configure {
|
||||
mapping from: /jackson-.*/, to: 'jackson'
|
||||
|
|
|
@ -43,15 +43,17 @@ testClusters.all {
|
|||
module ':modules:lang-mustache'
|
||||
}
|
||||
|
||||
thirdPartyAudit.ignoreMissingClasses(
|
||||
// from log4j
|
||||
'org.osgi.framework.AdaptPermission',
|
||||
'org.osgi.framework.AdminPermission',
|
||||
'org.osgi.framework.Bundle',
|
||||
'org.osgi.framework.BundleActivator',
|
||||
'org.osgi.framework.BundleContext',
|
||||
'org.osgi.framework.BundleEvent',
|
||||
'org.osgi.framework.SynchronousBundleListener',
|
||||
'org.osgi.framework.wiring.BundleWire',
|
||||
'org.osgi.framework.wiring.BundleWiring'
|
||||
)
|
||||
tasks.named("thirdPartyAudit").configure {
|
||||
ignoreMissingClasses(
|
||||
// from log4j
|
||||
'org.osgi.framework.AdaptPermission',
|
||||
'org.osgi.framework.AdminPermission',
|
||||
'org.osgi.framework.Bundle',
|
||||
'org.osgi.framework.BundleActivator',
|
||||
'org.osgi.framework.BundleContext',
|
||||
'org.osgi.framework.BundleEvent',
|
||||
'org.osgi.framework.SynchronousBundleListener',
|
||||
'org.osgi.framework.wiring.BundleWire',
|
||||
'org.osgi.framework.wiring.BundleWiring'
|
||||
)
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ testClusters.all {
|
|||
setting 'reindex.remote.whitelist', '127.0.0.1:*'
|
||||
}
|
||||
|
||||
test {
|
||||
tasks.named("test").configure {
|
||||
/*
|
||||
* 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
|
||||
|
@ -66,16 +66,18 @@ restResources {
|
|||
}
|
||||
}
|
||||
|
||||
thirdPartyAudit.ignoreMissingClasses(
|
||||
// Commons logging
|
||||
'javax.servlet.ServletContextEvent',
|
||||
'javax.servlet.ServletContextListener',
|
||||
'org.apache.avalon.framework.logger.Logger',
|
||||
'org.apache.log.Hierarchy',
|
||||
'org.apache.log.Logger',
|
||||
)
|
||||
tasks.named("thirdPartyAudit").configure {
|
||||
ignoreMissingClasses(
|
||||
// Commons logging
|
||||
'javax.servlet.ServletContextEvent',
|
||||
'javax.servlet.ServletContextListener',
|
||||
'org.apache.avalon.framework.logger.Logger',
|
||||
'org.apache.log.Hierarchy',
|
||||
'org.apache.log.Logger',
|
||||
)
|
||||
}
|
||||
|
||||
forbiddenPatterns {
|
||||
tasks.named("forbiddenPatterns").configure {
|
||||
// PKCS#12 file are not UTF-8
|
||||
exclude '**/*.p12'
|
||||
}
|
||||
|
@ -127,7 +129,7 @@ if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
|||
versions = ['2', '1']
|
||||
}
|
||||
for (String version : versions) {
|
||||
Task unzip = task("unzipEs${version}", type: Sync) {
|
||||
TaskProvider<Sync> unzip = tasks.register("unzipEs${version}", Sync) {
|
||||
Configuration oldEsDependency = configurations['es' + version]
|
||||
dependsOn oldEsDependency
|
||||
/* Use a closure here to delay resolution of the dependency until we need
|
||||
|
@ -146,7 +148,7 @@ if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
|||
env 'JAVA_HOME', jdks.legacy.javaHomePath
|
||||
args 'oldes.OldElasticsearch',
|
||||
baseDir,
|
||||
unzip.temporaryDir,
|
||||
unzip.get().temporaryDir,
|
||||
version == '090'
|
||||
waitCondition = { fixture, ant ->
|
||||
// the fixture writes the ports file when Elasticsearch's HTTP service
|
||||
|
|
|
@ -49,13 +49,14 @@ task urlFixture(type: AntFixture) {
|
|||
executable = "${BuildParams.runtimeJavaHome}/bin/java"
|
||||
args 'org.elasticsearch.repositories.url.URLFixture', baseDir, "${repositoryDir.absolutePath}"
|
||||
}
|
||||
yamlRestTest {
|
||||
tasks.named("yamlRestTest").configure {
|
||||
dependsOn urlFixture
|
||||
}
|
||||
|
||||
internalClusterTest {
|
||||
tasks.named("internalClusterTest").configure {
|
||||
dependsOn urlFixture
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
// repositoryDir is used by a FS repository to create snapshots
|
||||
setting 'path.repo', "${repositoryDir.absolutePath}", PropertyNormalization.IGNORE_VALUE
|
||||
|
|
|
@ -59,7 +59,7 @@ tasks.named("dependencyLicenses").configure {
|
|||
mapping from: /netty-.*/, to: 'netty'
|
||||
}
|
||||
|
||||
test {
|
||||
tasks.named("test").configure {
|
||||
/*
|
||||
* 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.
|
||||
|
@ -67,11 +67,11 @@ test {
|
|||
systemProperty 'es.set.netty.runtime.available.processors', 'false'
|
||||
}
|
||||
|
||||
internalClusterTest {
|
||||
tasks.named("internalClusterTest").configure {
|
||||
systemProperty 'es.set.netty.runtime.available.processors', 'false'
|
||||
}
|
||||
|
||||
javaRestTest {
|
||||
tasks.named("javaRestTest").configure {
|
||||
systemProperty 'es.set.netty.runtime.available.processors', 'false'
|
||||
}
|
||||
|
||||
|
@ -91,19 +91,24 @@ TaskProvider<Test> pooledInternalClusterTest = tasks.register("pooledInternalClu
|
|||
setClasspath(internalTestSourceSet.getRuntimeClasspath())
|
||||
}
|
||||
|
||||
RestIntegTestTask pooledJavaRestTest = tasks.create("pooledJavaRestTest", RestIntegTestTask) {
|
||||
TaskProvider<RestIntegTestTask> pooledJavaRestTest = tasks.register("pooledJavaRestTest", RestIntegTestTask) {
|
||||
systemProperty 'es.set.netty.runtime.available.processors', 'false'
|
||||
SourceSetContainer sourceSets = project.getExtensions().getByType(SourceSetContainer.class);
|
||||
SourceSet javaRestTestSourceSet = sourceSets.getByName(JavaRestTestPlugin.SOURCE_SET_NAME)
|
||||
setTestClassesDirs(javaRestTestSourceSet.getOutput().getClassesDirs())
|
||||
setClasspath(javaRestTestSourceSet.getRuntimeClasspath())
|
||||
}
|
||||
testClusters.pooledJavaRestTest {
|
||||
systemProperty 'es.use_unpooled_allocator', 'false'
|
||||
}
|
||||
check.dependsOn(pooledTest, pooledJavaRestTest, pooledInternalClusterTest)
|
||||
|
||||
thirdPartyAudit {
|
||||
|
||||
testClusters.pooledJavaRestTest {
|
||||
systemProperty 'es.use_unpooled_allocator', 'false'
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named("check").configure {
|
||||
dependsOn(pooledTest, pooledJavaRestTest, pooledInternalClusterTest)
|
||||
}
|
||||
|
||||
tasks.named("thirdPartyAudit").configure {
|
||||
ignoreMissingClasses(
|
||||
// classes are missing
|
||||
|
||||
|
|
|
@ -41,7 +41,9 @@ tasks.named("dependencyLicenses").configure {
|
|||
mapping from: /morfologik-.*/, to: 'lucene'
|
||||
}
|
||||
|
||||
thirdPartyAudit.ignoreMissingClasses(
|
||||
// we don't use the morfologik-fsa polish stemmer
|
||||
'morfologik.stemming.polish.PolishStemmer'
|
||||
)
|
||||
tasks.named("thirdPartyAudit").configure {
|
||||
ignoreMissingClasses(
|
||||
// we don't use the morfologik-fsa polish stemmer
|
||||
'morfologik.stemming.polish.PolishStemmer'
|
||||
)
|
||||
}
|
||||
|
|
|
@ -44,13 +44,15 @@ test {
|
|||
systemProperty 'tests.artifact', project.name
|
||||
}
|
||||
|
||||
thirdPartyAudit.ignoreMissingClasses(
|
||||
// classes are missing
|
||||
'com.google.common.base.Splitter',
|
||||
'com.google.common.collect.Lists',
|
||||
'javax.servlet.ServletContextEvent',
|
||||
'javax.servlet.ServletContextListener',
|
||||
'org.apache.avalon.framework.logger.Logger',
|
||||
'org.apache.log.Hierarchy',
|
||||
'org.apache.log.Logger'
|
||||
)
|
||||
tasks.named("thirdPartyAudit").configure {
|
||||
ignoreMissingClasses(
|
||||
// classes are missing
|
||||
'com.google.common.base.Splitter',
|
||||
'com.google.common.collect.Lists',
|
||||
'javax.servlet.ServletContextEvent',
|
||||
'javax.servlet.ServletContextListener',
|
||||
'org.apache.avalon.framework.logger.Logger',
|
||||
'org.apache.log.Hierarchy',
|
||||
'org.apache.log.Logger'
|
||||
)
|
||||
}
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
// Subprojects aren't published so do not assemble
|
||||
gradle.projectsEvaluated {
|
||||
subprojects {
|
||||
Task assemble = project.tasks.findByName('assemble')
|
||||
if (assemble) {
|
||||
assemble.enabled = false
|
||||
project.tasks.matching { it.name.equals('assemble') }.configureEach {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ esplugin {
|
|||
}
|
||||
|
||||
// No unit tests in this example
|
||||
test.enabled = false
|
||||
tasks.named("test").configure { enabled = false }
|
||||
|
||||
tasks.register("exampleFixture", org.elasticsearch.gradle.test.AntFixture) {
|
||||
dependsOn sourceSets.javaRestTest.runtimeClasspath
|
||||
|
|
|
@ -18,9 +18,9 @@ dependencies {
|
|||
javaRestTestImplementation project.sourceSets.main.runtimeClasspath
|
||||
}
|
||||
//no unit tests
|
||||
test.enabled = false
|
||||
tasks.named("test").configure { enabled = false }
|
||||
javaRestTest {
|
||||
dependsOn buildZip
|
||||
dependsOn "buildZip"
|
||||
systemProperty 'tests.security.manager', 'false'
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ tasks.named("dependencyLicenses").configure {
|
|||
mapping from: /stax-.*/, to: 'stax'
|
||||
}
|
||||
|
||||
thirdPartyAudit {
|
||||
tasks.named("thirdPartyAudit").configure {
|
||||
ignoreMissingClasses(
|
||||
// Optional and not enabled by Elasticsearch
|
||||
'org.slf4j.Logger',
|
||||
|
@ -108,7 +108,7 @@ Map<String, Object> expansions = [
|
|||
'base_path': azureBasePath + "_integration_tests"
|
||||
]
|
||||
|
||||
processYamlRestTestResources {
|
||||
tasks.named("processYamlRestTestResources").configure {
|
||||
inputs.properties(expansions)
|
||||
MavenFilteringHack.filter(it, expansions)
|
||||
}
|
||||
|
@ -151,4 +151,4 @@ task azureThirdPartyTest(type: Test) {
|
|||
nonInputProperties.systemProperty 'test.azure.endpoint_suffix', "${-> azureAddress.call() }"
|
||||
}
|
||||
}
|
||||
check.dependsOn(azureThirdPartyTest)
|
||||
tasks.named("check").configure { dependsOn("azureThirdPartyTest") }
|
||||
|
|
|
@ -85,7 +85,7 @@ tasks.named("dependencyLicenses").configure {
|
|||
mapping from: /proto-google.*/, to: 'proto-google'
|
||||
}
|
||||
|
||||
thirdPartyAudit {
|
||||
tasks.named("thirdPartyAudit").configure {
|
||||
ignoreViolations(
|
||||
// uses internal java api: sun.misc.Unsafe
|
||||
'com.google.protobuf.UnsafeUtil',
|
||||
|
@ -233,7 +233,7 @@ def encodedCredentials = {
|
|||
}
|
||||
|
||||
/** A service account file that points to the Google Cloud Storage service emulated by the fixture **/
|
||||
task createServiceAccountFile() {
|
||||
tasks.register("createServiceAccountFile") {
|
||||
doLast {
|
||||
KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA")
|
||||
keyPairGenerator.initialize(1024)
|
||||
|
@ -242,13 +242,13 @@ task createServiceAccountFile() {
|
|||
|
||||
serviceAccountFile.parentFile.mkdirs()
|
||||
serviceAccountFile.setText("{\n" +
|
||||
' "type": "service_account",\n' +
|
||||
' "project_id": "integration_test",\n' +
|
||||
' "private_key_id": "' + UUID.randomUUID().toString() + '",\n' +
|
||||
' "private_key": "-----BEGIN PRIVATE KEY-----\\n' + encodedKey + '\\n-----END PRIVATE KEY-----\\n",\n' +
|
||||
' "client_email": "integration_test@appspot.gserviceaccount.com",\n' +
|
||||
' "client_id": "123456789101112130594"\n' +
|
||||
'}', 'UTF-8')
|
||||
' "type": "service_account",\n' +
|
||||
' "project_id": "integration_test",\n' +
|
||||
' "private_key_id": "' + UUID.randomUUID().toString() + '",\n' +
|
||||
' "private_key": "-----BEGIN PRIVATE KEY-----\\n' + encodedKey + '\\n-----END PRIVATE KEY-----\\n",\n' +
|
||||
' "client_email": "integration_test@appspot.gserviceaccount.com",\n' +
|
||||
' "client_id": "123456789101112130594"\n' +
|
||||
'}', 'UTF-8')
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -257,12 +257,12 @@ Map<String, Object> expansions = [
|
|||
'base_path': gcsBasePath + "_integration_tests"
|
||||
]
|
||||
|
||||
processYamlRestTestResources {
|
||||
tasks.named("processYamlRestTestResources").configure {
|
||||
inputs.properties(expansions)
|
||||
MavenFilteringHack.filter(it, expansions)
|
||||
}
|
||||
|
||||
internalClusterTest {
|
||||
tasks.named("internalClusterTest").configure {
|
||||
// this is tested explicitly in a separate test task
|
||||
exclude '**/GoogleCloudStorageThirdPartyTests.class'
|
||||
}
|
||||
|
@ -279,9 +279,9 @@ final Closure testClustersConfiguration = {
|
|||
}
|
||||
}
|
||||
|
||||
yamlRestTest {
|
||||
tasks.named("yamlRestTest").configure {
|
||||
if (useFixture) {
|
||||
dependsOn createServiceAccountFile
|
||||
dependsOn "createServiceAccountFile"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -293,29 +293,28 @@ testClusters {
|
|||
* We only use a small amount of data in these tests, which means that the resumable upload path is not tested. We add
|
||||
* an additional test that forces the large blob threshold to be small to exercise the resumable upload path.
|
||||
*/
|
||||
task largeBlobYamlRestTest(type: RestIntegTestTask) {
|
||||
dependsOn bundlePlugin
|
||||
def largeBlobYamlRestTest = tasks.register("largeBlobYamlRestTest", RestIntegTestTask) {
|
||||
dependsOn "bundlePlugin"
|
||||
if (useFixture) {
|
||||
dependsOn createServiceAccountFile
|
||||
dependsOn "createServiceAccountFile"
|
||||
}
|
||||
SourceSetContainer sourceSets = project.getExtensions().getByType(SourceSetContainer.class);
|
||||
SourceSet yamlRestTestSourceSet = sourceSets.getByName(YamlRestTestPlugin.SOURCE_SET_NAME)
|
||||
setTestClassesDirs(yamlRestTestSourceSet.getOutput().getClassesDirs())
|
||||
setClasspath(yamlRestTestSourceSet.getRuntimeClasspath())
|
||||
}
|
||||
SourceSetContainer sourceSets = project.getExtensions().getByType(SourceSetContainer.class);
|
||||
SourceSet yamlRestTestSourceSet = sourceSets.getByName(YamlRestTestPlugin.SOURCE_SET_NAME)
|
||||
setTestClassesDirs(yamlRestTestSourceSet.getOutput().getClassesDirs())
|
||||
setClasspath(yamlRestTestSourceSet.getRuntimeClasspath())
|
||||
|
||||
check.dependsOn largeBlobYamlRestTest
|
||||
// We have to wait for configure the cluster here as it might not have been created otherwise yet.
|
||||
testClusters {
|
||||
largeBlobYamlRestTest {
|
||||
plugin bundlePlugin.archiveFile
|
||||
|
||||
testClusters {
|
||||
largeBlobYamlRestTest {
|
||||
plugin bundlePlugin.archiveFile
|
||||
|
||||
// force large blob uploads by setting the threshold small, forcing this code path to be tested
|
||||
systemProperty 'es.repository_gcs.large_blob_threshold_byte_size', '256'
|
||||
// force large blob uploads by setting the threshold small, forcing this code path to be tested
|
||||
systemProperty 'es.repository_gcs.large_blob_threshold_byte_size', '256'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task gcsThirdPartyTest(type: Test) {
|
||||
def gcsThirdPartyTest = tasks.register("gcsThirdPartyTest", Test) {
|
||||
SourceSetContainer sourceSets = project.getExtensions().getByType(SourceSetContainer.class);
|
||||
SourceSet internalTestSourceSet = sourceSets.getByName(InternalClusterTestPlugin.SOURCE_SET_NAME)
|
||||
setTestClassesDirs(internalTestSourceSet.getOutput().getClassesDirs())
|
||||
|
@ -326,9 +325,12 @@ task gcsThirdPartyTest(type: Test) {
|
|||
nonInputProperties.systemProperty 'test.google.base', gcsBasePath + "_third_party_tests_" + BuildParams.testSeed
|
||||
nonInputProperties.systemProperty 'test.google.account', "${-> encodedCredentials.call()}"
|
||||
if (useFixture) {
|
||||
dependsOn createServiceAccountFile
|
||||
dependsOn "createServiceAccountFile"
|
||||
nonInputProperties.systemProperty 'test.google.endpoint', "${-> fixtureAddress('gcs-fixture-third-party')}"
|
||||
nonInputProperties.systemProperty 'test.google.tokenURI', "${-> fixtureAddress('gcs-fixture-third-party')}/o/oauth2/token"
|
||||
}
|
||||
}
|
||||
check.dependsOn(gcsThirdPartyTest)
|
||||
|
||||
tasks.named("check").configure {
|
||||
dependsOn(largeBlobYamlRestTest, gcsThirdPartyTest)
|
||||
}
|
|
@ -96,7 +96,7 @@ tasks.named("dependencyLicenses").configure {
|
|||
}
|
||||
|
||||
tasks.named("integTest").configure {
|
||||
it.dependsOn(project.tasks.named("bundlePlugin"))
|
||||
dependsOn(project.tasks.named("bundlePlugin"))
|
||||
}
|
||||
|
||||
testClusters.integTest {
|
||||
|
@ -155,7 +155,7 @@ Set disabledIntegTestTaskNames = []
|
|||
for (String integTestTaskName : ['integTestHa', 'integTestSecure', 'integTestSecureHa']) {
|
||||
task "${integTestTaskName}"(type: RestIntegTestTask) {
|
||||
description = "Runs rest tests against an elasticsearch cluster with HDFS."
|
||||
dependsOn(project.bundlePlugin)
|
||||
dependsOn("bundlePlugin")
|
||||
|
||||
if (disabledIntegTestTaskNames.contains(integTestTaskName)) {
|
||||
enabled = false;
|
||||
|
|
|
@ -71,7 +71,7 @@ tasks.named("dependencyLicenses").configure {
|
|||
mapping from: /jaxb-.*/, to: 'jaxb'
|
||||
}
|
||||
|
||||
bundlePlugin {
|
||||
tasks.named("bundlePlugin").configure {
|
||||
from('config/repository-s3') {
|
||||
into 'config'
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ if (!s3EC2Bucket && !s3EC2BasePath && !s3ECSBucket && !s3ECSBasePath) {
|
|||
throw new IllegalArgumentException("not all options specified to run EC2/ECS tests are present")
|
||||
}
|
||||
|
||||
processYamlRestTestResources {
|
||||
tasks.named("processYamlRestTestResources").configure {
|
||||
Map<String, Object> expansions = [
|
||||
'permanent_bucket' : s3PermanentBucket,
|
||||
'permanent_base_path' : s3PermanentBasePath + "_integration_tests",
|
||||
|
@ -215,7 +215,7 @@ if (useFixture) {
|
|||
|
||||
task yamlRestTestMinio(type: RestIntegTestTask) {
|
||||
description = "Runs REST tests using the Minio repository."
|
||||
dependsOn tasks.bundlePlugin
|
||||
dependsOn tasks.named("bundlePlugin")
|
||||
SourceSetContainer sourceSets = project.getExtensions().getByType(SourceSetContainer.class);
|
||||
SourceSet yamlRestTestSourceSet = sourceSets.getByName(YamlRestTestPlugin.SOURCE_SET_NAME)
|
||||
setTestClassesDirs(yamlRestTestSourceSet.getOutput().getClassesDirs())
|
||||
|
@ -228,7 +228,7 @@ if (useFixture) {
|
|||
'repository_s3/50_repository_ecs_credentials/*'
|
||||
].join(",")
|
||||
}
|
||||
check.dependsOn(yamlRestTestMinio)
|
||||
tasks.named("check").configure { dependsOn(yamlRestTestMinio) }
|
||||
|
||||
testClusters.yamlRestTestMinio {
|
||||
keystore 's3.client.integration_test_permanent.access_key', s3PermanentAccessKey
|
||||
|
@ -255,7 +255,7 @@ if (useFixture) {
|
|||
'repository_s3/40_repository_ec2_credentials/*'
|
||||
].join(",")
|
||||
}
|
||||
check.dependsOn(yamlRestTestECS)
|
||||
tasks.named("check").configure { dependsOn(yamlRestTestECS) }
|
||||
|
||||
testClusters.yamlRestTestECS {
|
||||
setting 's3.client.integration_test_ecs.endpoint', { "${-> fixtureAddress('s3-fixture', 's3-fixture-with-ecs', '80')}" }, IGNORE_VALUE
|
||||
|
@ -281,32 +281,32 @@ TaskProvider s3ThirdPartyTest = tasks.register("s3ThirdPartyTest", Test) {
|
|||
}
|
||||
tasks.named("check").configure { dependsOn(s3ThirdPartyTest) }
|
||||
|
||||
thirdPartyAudit.ignoreMissingClasses(
|
||||
// classes are missing
|
||||
'javax.servlet.ServletContextEvent',
|
||||
'javax.servlet.ServletContextListener',
|
||||
'org.apache.avalon.framework.logger.Logger',
|
||||
'org.apache.log.Hierarchy',
|
||||
'org.apache.log.Logger',
|
||||
'software.amazon.ion.IonReader',
|
||||
'software.amazon.ion.IonSystem',
|
||||
'software.amazon.ion.IonType',
|
||||
'software.amazon.ion.IonWriter',
|
||||
'software.amazon.ion.Timestamp',
|
||||
'software.amazon.ion.system.IonBinaryWriterBuilder',
|
||||
'software.amazon.ion.system.IonSystemBuilder',
|
||||
'software.amazon.ion.system.IonTextWriterBuilder',
|
||||
'software.amazon.ion.system.IonWriterBuilder',
|
||||
// We don't use the kms dependency
|
||||
'com.amazonaws.services.kms.AWSKMS',
|
||||
'com.amazonaws.services.kms.AWSKMSClient',
|
||||
'com.amazonaws.services.kms.model.DecryptRequest',
|
||||
'com.amazonaws.services.kms.model.DecryptResult',
|
||||
'com.amazonaws.services.kms.model.EncryptRequest',
|
||||
'com.amazonaws.services.kms.model.EncryptResult',
|
||||
'com.amazonaws.services.kms.model.GenerateDataKeyRequest',
|
||||
'com.amazonaws.services.kms.model.GenerateDataKeyResult'
|
||||
)
|
||||
|
||||
thirdPartyAudit.ignoreMissingClasses 'javax.activation.DataHandler'
|
||||
|
||||
tasks.named("thirdPartyAudit").configure {
|
||||
ignoreMissingClasses(
|
||||
// classes are missing
|
||||
'javax.servlet.ServletContextEvent',
|
||||
'javax.servlet.ServletContextListener',
|
||||
'org.apache.avalon.framework.logger.Logger',
|
||||
'org.apache.log.Hierarchy',
|
||||
'org.apache.log.Logger',
|
||||
'software.amazon.ion.IonReader',
|
||||
'software.amazon.ion.IonSystem',
|
||||
'software.amazon.ion.IonType',
|
||||
'software.amazon.ion.IonWriter',
|
||||
'software.amazon.ion.Timestamp',
|
||||
'software.amazon.ion.system.IonBinaryWriterBuilder',
|
||||
'software.amazon.ion.system.IonSystemBuilder',
|
||||
'software.amazon.ion.system.IonTextWriterBuilder',
|
||||
'software.amazon.ion.system.IonWriterBuilder',
|
||||
// We don't use the kms dependency
|
||||
'com.amazonaws.services.kms.AWSKMS',
|
||||
'com.amazonaws.services.kms.AWSKMSClient',
|
||||
'com.amazonaws.services.kms.model.DecryptRequest',
|
||||
'com.amazonaws.services.kms.model.DecryptResult',
|
||||
'com.amazonaws.services.kms.model.EncryptRequest',
|
||||
'com.amazonaws.services.kms.model.EncryptResult',
|
||||
'com.amazonaws.services.kms.model.GenerateDataKeyRequest',
|
||||
'com.amazonaws.services.kms.model.GenerateDataKeyResult',
|
||||
'javax.activation.DataHandler'
|
||||
)
|
||||
}
|
|
@ -23,5 +23,7 @@ testClusters.javaRestTest {
|
|||
systemProperty "die.with.dignity.test", "whatever"
|
||||
}
|
||||
|
||||
test.enabled = false
|
||||
tasks.named("test").configure {
|
||||
enabled = false
|
||||
}
|
||||
|
||||
|
|
|
@ -32,11 +32,11 @@ dependencies {
|
|||
|
||||
// TODO: give each evil test its own fresh JVM for more isolation.
|
||||
|
||||
test {
|
||||
tasks.named("test").configure {
|
||||
systemProperty 'tests.security.manager', 'false'
|
||||
}
|
||||
|
||||
thirdPartyAudit {
|
||||
tasks.named("thirdPartyAudit").configure {
|
||||
ignoreMissingClasses(
|
||||
'com.ibm.icu.lang.UCharacter'
|
||||
)
|
||||
|
|
|
@ -41,7 +41,7 @@ for (Version bwcVersion : BuildParams.bwcVersions.indexCompatible) {
|
|||
|
||||
tasks.register("${baseName}#oldClusterTest", StandaloneRestIntegTestTask) {
|
||||
useCluster testClusters."${baseName}"
|
||||
mustRunAfter(precommit)
|
||||
mustRunAfter("precommit")
|
||||
doFirst {
|
||||
delete("${buildDir}/cluster/shared/repo/${baseName}")
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ for (Version bwcVersion : BuildParams.bwcVersions.wireCompatible) {
|
|||
|
||||
tasks.register("${baseName}#mixedClusterTest", StandaloneRestIntegTestTask) {
|
||||
useCluster testClusters."${baseName}"
|
||||
mustRunAfter(precommit)
|
||||
mustRunAfter("precommit")
|
||||
doFirst {
|
||||
delete("${buildDir}/cluster/shared/repo/${baseName}")
|
||||
// Getting the endpoints causes a wait for the cluster
|
||||
|
|
|
@ -28,7 +28,7 @@ dependencies {
|
|||
}
|
||||
|
||||
task 'remote-cluster'(type: RestIntegTestTask) {
|
||||
mustRunAfter(precommit)
|
||||
mustRunAfter("precommit")
|
||||
systemProperty 'tests.rest.suite', 'remote_cluster'
|
||||
}
|
||||
|
||||
|
|
|
@ -47,15 +47,15 @@ tasks.named('forbiddenApisTest').configure {
|
|||
}
|
||||
|
||||
// we don't have additional tests for the tests themselves
|
||||
tasks.test.enabled = false
|
||||
tasks.named("test").configure { enabled = false }
|
||||
// Tests are destructive and meant to run in a VM, they don't adhere to general conventions
|
||||
testingConventions.enabled = false
|
||||
tasks.named("testingConventions").configure { enabled = false }
|
||||
|
||||
// this project doesn't get published
|
||||
tasks.named("dependencyLicenses").configure { it.enabled = false }
|
||||
tasks.dependenciesInfo.enabled = false
|
||||
tasks.named("dependencyLicenses").configure { enabled = false }
|
||||
tasks.named("dependenciesInfo").configure {enabled = false }
|
||||
|
||||
tasks.thirdPartyAudit.ignoreMissingClasses()
|
||||
tasks.named("thirdPartyAudit").configure { ignoreMissingClasses() }
|
||||
|
||||
tasks.register('destructivePackagingTest') {
|
||||
dependsOn 'destructiveDistroTest'
|
||||
|
|
|
@ -49,7 +49,7 @@ for (Version bwcVersion : BuildParams.bwcVersions.indexCompatible) {
|
|||
|
||||
tasks.register("${baseName}#Step1OldClusterTest", StandaloneRestIntegTestTask) {
|
||||
useCluster testClusters."${oldClusterName}"
|
||||
mustRunAfter(precommit)
|
||||
mustRunAfter("precommit")
|
||||
doFirst {
|
||||
delete("${buildDir}/cluster/shared/repo/${baseName}")
|
||||
}
|
||||
|
|
|
@ -53,9 +53,9 @@ for (Version bwcVersion : BuildParams.bwcVersions.wireCompatible) {
|
|||
}
|
||||
|
||||
tasks.register("${baseName}#oldClusterTest", StandaloneRestIntegTestTask) {
|
||||
dependsOn processTestResources
|
||||
dependsOn "processTestResources"
|
||||
useCluster testClusters."${baseName}"
|
||||
mustRunAfter(precommit)
|
||||
mustRunAfter("precommit")
|
||||
doFirst {
|
||||
delete("${buildDir}/cluster/shared/repo/${baseName}")
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ dependencies {
|
|||
testImplementation project(':test:framework')
|
||||
}
|
||||
|
||||
war {
|
||||
tasks.named("war").configure {
|
||||
archiveFileName = 'example-app.war'
|
||||
}
|
||||
|
||||
|
@ -63,8 +63,8 @@ elasticsearch_distributions {
|
|||
}
|
||||
}
|
||||
|
||||
preProcessFixture {
|
||||
dependsOn war, elasticsearch_distributions.docker
|
||||
tasks.named("preProcessFixture").configure {
|
||||
dependsOn "war", elasticsearch_distributions.docker
|
||||
}
|
||||
|
||||
dockerCompose {
|
||||
|
@ -81,17 +81,20 @@ tasks.register("integTest", Test) {
|
|||
include '**/*IT.class'
|
||||
}
|
||||
|
||||
check.dependsOn integTest
|
||||
tasks.named("check").configure {
|
||||
dependsOn "integTest"
|
||||
}
|
||||
tasks.named("test").configure {enabled = false }
|
||||
tasks.named("dependencyLicenses").configure { enabled = false }
|
||||
tasks.named("dependenciesInfo") {
|
||||
enabled = false
|
||||
}
|
||||
|
||||
test.enabled = false
|
||||
tasks.named("thirdPartyAudit").configure {
|
||||
enabled = false
|
||||
}
|
||||
|
||||
tasks.named("dependencyLicenses").configure { it.enabled = false }
|
||||
dependenciesInfo.enabled = false
|
||||
|
||||
thirdPartyAudit.enabled = false
|
||||
|
||||
|
||||
testingConventions {
|
||||
tasks.named("testingConventions").configure {
|
||||
naming.clear()
|
||||
// We only have one "special" integration test here to connect to wildfly
|
||||
naming {
|
||||
|
|
|
@ -38,8 +38,8 @@ dependencies {
|
|||
api "org.elasticsearch:mocksocket:${versions.mocksocket}"
|
||||
}
|
||||
|
||||
compileJava.options.compilerArgs << '-Xlint:-cast,-rawtypes,-unchecked'
|
||||
compileTestJava.options.compilerArgs << '-Xlint:-rawtypes'
|
||||
tasks.named("compileJava").configure { options.compilerArgs << '-Xlint:-cast,-rawtypes,-unchecked' }
|
||||
tasks.named("compileTestJava").configure { options.compilerArgs << '-Xlint:-rawtypes' }
|
||||
|
||||
// the main files are actually test files, so use the appropriate forbidden api sigs
|
||||
tasks.named('forbiddenApisMain').configure {
|
||||
|
@ -47,23 +47,25 @@ tasks.named('forbiddenApisMain').configure {
|
|||
}
|
||||
|
||||
// TODO: should we have licenses for our test deps?
|
||||
tasks.named("dependencyLicenses").configure { it.enabled = false }
|
||||
dependenciesInfo.enabled = false
|
||||
tasks.named("dependencyLicenses").configure { enabled = false }
|
||||
tasks.named("dependenciesInfo").configure { enabled = false }
|
||||
|
||||
thirdPartyAudit.ignoreMissingClasses(
|
||||
// classes are missing
|
||||
'javax.servlet.ServletContextEvent',
|
||||
'javax.servlet.ServletContextListener',
|
||||
'org.apache.avalon.framework.logger.Logger',
|
||||
'org.apache.log.Hierarchy',
|
||||
'org.apache.log.Logger',
|
||||
'org.apache.log4j.Category',
|
||||
'org.apache.log4j.Level',
|
||||
'org.apache.log4j.Logger',
|
||||
'org.apache.log4j.Priority'
|
||||
)
|
||||
tasks.named("thirdPartyAudit").configure {
|
||||
ignoreMissingClasses(
|
||||
// classes are missing
|
||||
'javax.servlet.ServletContextEvent',
|
||||
'javax.servlet.ServletContextListener',
|
||||
'org.apache.avalon.framework.logger.Logger',
|
||||
'org.apache.log.Hierarchy',
|
||||
'org.apache.log.Logger',
|
||||
'org.apache.log4j.Category',
|
||||
'org.apache.log4j.Level',
|
||||
'org.apache.log4j.Logger',
|
||||
'org.apache.log4j.Priority'
|
||||
)
|
||||
}
|
||||
|
||||
test {
|
||||
tasks.named("test").configure {
|
||||
systemProperty 'tests.gradle_index_compat_versions', BuildParams.bwcVersions.indexCompatible.join(',')
|
||||
systemProperty 'tests.gradle_wire_compat_versions', BuildParams.bwcVersions.wireCompatible.join(',')
|
||||
systemProperty 'tests.gradle_unreleased_versions', BuildParams.bwcVersions.unreleased.join(',')
|
||||
|
@ -74,5 +76,5 @@ tasks.register("integTest", Test) {
|
|||
}
|
||||
|
||||
tasks.register("verifyVersions") {
|
||||
dependsOn test
|
||||
dependsOn "test"
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ project.forbiddenPatterns {
|
|||
exclude '**/*.key'
|
||||
}
|
||||
|
||||
tasks.named("dependencyLicenses").configure { it.enabled = false }
|
||||
tasks.named("dependencyLicenses").configure { enabled = false }
|
||||
|
||||
tasks.register("buildZip", Zip) {
|
||||
dependsOn "jar"
|
||||
|
|
|
@ -11,14 +11,7 @@ archivesBaseName = 'x-pack-async-search'
|
|||
compileJava.options.compilerArgs << "-Xlint:-rawtypes"
|
||||
compileTestJava.options.compilerArgs << "-Xlint:-rawtypes"
|
||||
|
||||
// add all sub-projects of the qa sub-project
|
||||
gradle.projectsEvaluated {
|
||||
project.subprojects
|
||||
.find { it.path == project.path + ":qa" }
|
||||
.subprojects
|
||||
.findAll { it.path.startsWith(project.path + ":qa") }
|
||||
.each { check.dependsOn it.check }
|
||||
}
|
||||
addQaCheckDependencies()
|
||||
|
||||
dependencies {
|
||||
compileOnly project(":server")
|
||||
|
|
|
@ -23,11 +23,4 @@ dependencies {
|
|||
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
||||
}
|
||||
|
||||
// add all sub-projects of the qa sub-project
|
||||
gradle.projectsEvaluated {
|
||||
project.subprojects
|
||||
.find { it.path == project.path + ":qa" }
|
||||
.subprojects
|
||||
.findAll { it.path.startsWith(project.path + ":qa") }
|
||||
.each { check.dependsOn it.check }
|
||||
}
|
||||
addQaCheckDependencies()
|
|
@ -76,8 +76,12 @@ tasks.register("copyKeyCerts", Copy) {
|
|||
}
|
||||
// Add keystores to test classpath: it expects it there
|
||||
sourceSets.yamlRestTest.resources.srcDir(keystoreDir)
|
||||
processYamlRestTestResources.dependsOn("copyKeyCerts")
|
||||
processJavaRestTestResources.dependsOn("copyKeyCerts")
|
||||
tasks.named("processYamlRestTestResources").configure {
|
||||
dependsOn("copyKeyCerts")
|
||||
}
|
||||
tasks.named("processJavaRestTestResources").configure {
|
||||
dependsOn("copyKeyCerts")
|
||||
}
|
||||
|
||||
yamlRestTest {
|
||||
/*
|
||||
|
@ -96,7 +100,7 @@ yamlRestTest {
|
|||
blacklist.addAll(['xpack/15_basic/*', 'license/20_put_license/*', 'license/30_enterprise_license/*'])
|
||||
}
|
||||
systemProperty 'tests.rest.blacklist', blacklist.join(',')
|
||||
dependsOn copyKeyCerts
|
||||
dependsOn "copyKeyCerts"
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
|
|
|
@ -25,14 +25,7 @@ tasks.named('internalClusterTest').configure {
|
|||
exclude noSecurityManagerITClasses
|
||||
}
|
||||
|
||||
// add all sub-projects of the qa sub-project
|
||||
gradle.projectsEvaluated {
|
||||
project.subprojects
|
||||
.find { it.path == project.path + ":qa" }
|
||||
.subprojects
|
||||
.findAll { it.path.startsWith(project.path + ":qa") }
|
||||
.each { check.dependsOn it.check }
|
||||
}
|
||||
addQaCheckDependencies()
|
||||
|
||||
dependencies {
|
||||
compileOnly project(":server")
|
||||
|
|
|
@ -11,7 +11,7 @@ dependencies {
|
|||
}
|
||||
|
||||
task "leader-cluster"(type: RestIntegTestTask) {
|
||||
mustRunAfter(precommit)
|
||||
mustRunAfter("precommit")
|
||||
systemProperty 'tests.target_cluster', 'leader'
|
||||
}
|
||||
testClusters."leader-cluster" {
|
||||
|
|
|
@ -10,7 +10,7 @@ dependencies {
|
|||
}
|
||||
|
||||
task "leader-cluster"(type: RestIntegTestTask) {
|
||||
mustRunAfter(precommit)
|
||||
mustRunAfter("precommit")
|
||||
systemProperty 'tests.target_cluster', 'leader'
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ dependencies {
|
|||
}
|
||||
|
||||
task 'leader-cluster'(type: RestIntegTestTask) {
|
||||
mustRunAfter(precommit)
|
||||
mustRunAfter("precommit")
|
||||
systemProperty 'tests.target_cluster', 'leader'
|
||||
}
|
||||
testClusters.'leader-cluster' {
|
||||
|
@ -31,5 +31,5 @@ testClusters.'follow-cluster' {
|
|||
{ "\"${testClusters.'leader-cluster'.getAllTransportPortURI().join(",")}\"" }
|
||||
}
|
||||
|
||||
check.dependsOn "follow-cluster"
|
||||
test.enabled = false
|
||||
tasks.named("check").configure { dependsOn "follow-cluster" }
|
||||
tasks.named("test").configure { enabled = false }
|
||||
|
|
|
@ -9,7 +9,7 @@ dependencies {
|
|||
}
|
||||
|
||||
task 'leader-cluster'(type: RestIntegTestTask) {
|
||||
mustRunAfter(precommit)
|
||||
mustRunAfter("precommit")
|
||||
systemProperty 'tests.target_cluster', 'leader'
|
||||
}
|
||||
testClusters.'leader-cluster' {
|
||||
|
|
|
@ -18,7 +18,7 @@ tasks.register("resolve") {
|
|||
}
|
||||
}
|
||||
task 'leader-cluster'(type: RestIntegTestTask) {
|
||||
mustRunAfter(precommit)
|
||||
mustRunAfter("precommit")
|
||||
systemProperty 'tests.target_cluster', 'leader'
|
||||
}
|
||||
|
||||
|
@ -51,5 +51,6 @@ testClusters.'follow-cluster' {
|
|||
user username: "test_ccr", role: "ccruser"
|
||||
}
|
||||
|
||||
check.dependsOn 'follow-cluster'
|
||||
test.enabled = false // no unit tests for multi-cluster-search, only the rest integration test
|
||||
tasks.named("check").configure { dependsOn('follow-cluster') }
|
||||
// no unit tests for multi-cluster-search, only the rest integration test
|
||||
tasks.named("test").configure { enabled = false }
|
||||
|
|
|
@ -66,7 +66,7 @@ ext.expansions = [
|
|||
'project.version': version
|
||||
]
|
||||
|
||||
processResources {
|
||||
tasks.named("processResources").configure {
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
// we need to have duplicate strategy here as
|
||||
// we cannot apply the filter on root level due
|
||||
|
@ -92,7 +92,7 @@ processResources {
|
|||
}
|
||||
}
|
||||
|
||||
forbiddenPatterns {
|
||||
tasks.named("forbiddenPatterns").configure {
|
||||
exclude '**/*.key'
|
||||
exclude '**/*.p12'
|
||||
exclude '**/*.der'
|
||||
|
@ -103,15 +103,16 @@ tasks.named('forbiddenApisMain').configure {
|
|||
signaturesFiles += files('forbidden/hasher-signatures.txt')
|
||||
}
|
||||
|
||||
compileJava.options.compilerArgs << "-Xlint:-rawtypes,-unchecked"
|
||||
compileTestJava.options.compilerArgs << "-Xlint:-rawtypes,-unchecked"
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
options.compilerArgs << "-Xlint:-rawtypes,-unchecked"
|
||||
}
|
||||
|
||||
// make LicenseSigner available for testing signed licenses
|
||||
sourceSets.test.resources {
|
||||
srcDir 'src/main/config'
|
||||
}
|
||||
|
||||
test {
|
||||
tasks.named("test").configure {
|
||||
/*
|
||||
* 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.
|
||||
|
@ -132,7 +133,7 @@ def testJar = tasks.register("testJar", Jar) {
|
|||
|
||||
artifacts {
|
||||
// normal es plugins do not publish the jar but we need to since users need it for extensions
|
||||
archives jar
|
||||
archives tasks.named("jar")
|
||||
testArtifacts testJar
|
||||
}
|
||||
|
||||
|
|
|
@ -13,11 +13,4 @@ dependencies {
|
|||
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
||||
}
|
||||
|
||||
// add all sub-projects of the qa sub-project
|
||||
gradle.projectsEvaluated {
|
||||
project.subprojects
|
||||
.find { it.path == project.path + ":qa" }
|
||||
.subprojects
|
||||
.findAll { it.path.startsWith(project.path + ":qa") }
|
||||
.each { check.dependsOn it.check }
|
||||
}
|
||||
addQaCheckDependencies()
|
|
@ -8,14 +8,7 @@ esplugin {
|
|||
}
|
||||
archivesBaseName = 'x-pack-deprecation'
|
||||
|
||||
// add all sub-projects of the qa sub-project
|
||||
gradle.projectsEvaluated {
|
||||
project.subprojects
|
||||
.find { it.path == project.path + ":qa" }
|
||||
.subprojects
|
||||
.findAll { it.path.startsWith(project.path + ":qa") }
|
||||
.each { check.dependsOn it.check }
|
||||
}
|
||||
addQaCheckDependencies()
|
||||
|
||||
dependencies {
|
||||
compileOnly project(":x-pack:plugin:core")
|
||||
|
|
|
@ -16,7 +16,6 @@ dependencies {
|
|||
// let the javaRestTest see the classpath of main
|
||||
GradleUtils.extendSourceSet(project, "main", "javaRestTest", javaRestTest)
|
||||
|
||||
|
||||
restResources {
|
||||
restApi {
|
||||
includeCore '_common', 'indices', 'index'
|
||||
|
@ -28,4 +27,4 @@ testClusters.all {
|
|||
setting 'xpack.security.enabled', 'false'
|
||||
}
|
||||
|
||||
test.enabled = false
|
||||
tasks.named("test").configure { enabled = false }
|
||||
|
|
|
@ -17,11 +17,4 @@ dependencies {
|
|||
testImplementation project(path: xpackModule('monitoring'), configuration: 'testArtifacts')
|
||||
}
|
||||
|
||||
// add all sub-projects of the qa sub-project
|
||||
gradle.projectsEvaluated {
|
||||
project.subprojects
|
||||
.find { it.path == project.path + ":qa" }
|
||||
.subprojects
|
||||
.findAll { it.path.startsWith(project.path + ":qa") }
|
||||
.each { check.dependsOn it.check }
|
||||
}
|
||||
addQaCheckDependencies()
|
|
@ -42,14 +42,7 @@ dependencies {
|
|||
* TODO: Enable for all builds upon this feature release *
|
||||
****************************************************************/
|
||||
if (BuildParams.isSnapshotBuild()) {
|
||||
// add all sub-projects of the qa sub-project
|
||||
gradle.projectsEvaluated {
|
||||
project.subprojects
|
||||
.find { it.path == project.path + ":qa" }
|
||||
.subprojects
|
||||
.findAll { it.path.startsWith(project.path + ":qa") }
|
||||
.each { check.dependsOn it.check }
|
||||
}
|
||||
addQaCheckDependencies()
|
||||
}
|
||||
|
||||
/**********************************************
|
||||
|
|
|
@ -13,12 +13,4 @@ dependencies {
|
|||
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
||||
}
|
||||
|
||||
// add all sub-projects of the qa sub-project
|
||||
gradle.projectsEvaluated {
|
||||
project.subprojects
|
||||
.find { it.path == project.path + ":qa" }
|
||||
.subprojects
|
||||
.findAll { it.path.startsWith(project.path + ":qa") }
|
||||
.each { check.dependsOn it.check }
|
||||
}
|
||||
|
||||
addQaCheckDependencies()
|
||||
|
|
|
@ -52,16 +52,16 @@ dependencies {
|
|||
testImplementation "org.elasticsearch:mocksocket:${versions.mocksocket}"
|
||||
}
|
||||
|
||||
compileJava.options.compilerArgs << "-Xlint:-rawtypes,-unchecked"
|
||||
compileTestJava.options.compilerArgs << "-Xlint:-rawtypes,-unchecked"
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
options.compilerArgs << "-Xlint:-rawtypes,-unchecked"
|
||||
}
|
||||
|
||||
tasks.named("dependencyLicenses").configure {
|
||||
mapping from: /java-support|opensaml-.*/, to: 'shibboleth'
|
||||
mapping from: /http.*/, to: 'httpclient'
|
||||
}
|
||||
|
||||
forbiddenPatterns {
|
||||
tasks.named("forbiddenPatterns").configure {
|
||||
exclude '**/*.key'
|
||||
exclude '**/*.p12'
|
||||
exclude '**/*.der'
|
||||
|
@ -73,7 +73,7 @@ tasks.named('forbiddenApisMain').configure {
|
|||
}
|
||||
|
||||
// classes are missing, e.g. com.ibm.icu.lang.UCharacter
|
||||
thirdPartyAudit {
|
||||
tasks.named("thirdPartyAudit").configure {
|
||||
ignoreMissingClasses (
|
||||
// SAML dependencies
|
||||
// [missing classes] Some cli utilities that we don't use depend on these missing JCommander classes
|
||||
|
@ -336,16 +336,17 @@ thirdPartyAudit {
|
|||
)
|
||||
}
|
||||
|
||||
thirdPartyAudit.ignoreMissingClasses(
|
||||
'javax.xml.bind.JAXBContext',
|
||||
'javax.xml.bind.JAXBElement',
|
||||
'javax.xml.bind.JAXBException',
|
||||
'javax.xml.bind.Unmarshaller',
|
||||
'javax.xml.bind.UnmarshallerHandler',
|
||||
)
|
||||
tasks.named("thirdPartyAudit").configure {
|
||||
ignoreMissingClasses(
|
||||
'javax.xml.bind.JAXBContext',
|
||||
'javax.xml.bind.JAXBElement',
|
||||
'javax.xml.bind.JAXBException',
|
||||
'javax.xml.bind.Unmarshaller',
|
||||
'javax.xml.bind.UnmarshallerHandler',
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
test {
|
||||
tasks.named("test").configure {
|
||||
/*
|
||||
* 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.
|
||||
|
@ -357,18 +358,11 @@ internalClusterTest {
|
|||
systemProperty 'es.set.netty.runtime.available.processors', 'false'
|
||||
}
|
||||
|
||||
addQaCheckDependencies()
|
||||
|
||||
// add all sub-projects of the qa sub-project
|
||||
gradle.projectsEvaluated {
|
||||
project.subprojects
|
||||
.find { it.path == project.path + ":qa" }
|
||||
.subprojects
|
||||
.findAll { it.path.startsWith(project.path + ":qa") }
|
||||
.each { check.dependsOn it.check }
|
||||
}
|
||||
if (BuildParams.inFipsJvm) {
|
||||
// We don't support the IDP in FIPS-140 mode, so no need to run tests
|
||||
test.enabled = false
|
||||
tasks.named("test").configure { enabled = false }
|
||||
// We run neither integTests nor unit tests in FIPS-140 mode
|
||||
testingConventions.enabled = false
|
||||
tasks.named("testingConventions").configure { enabled = false }
|
||||
}
|
||||
|
|
|
@ -17,12 +17,4 @@ dependencies {
|
|||
testImplementation project(path: xpackModule('data-streams'), configuration: 'default')
|
||||
}
|
||||
|
||||
// add all sub-projects of the qa sub-project
|
||||
gradle.projectsEvaluated {
|
||||
project.subprojects
|
||||
.find { it.path == project.path + ":qa" }
|
||||
.subprojects
|
||||
.findAll { it.path.startsWith(project.path + ":qa") }
|
||||
.each { check.dependsOn it.check }
|
||||
}
|
||||
|
||||
addQaCheckDependencies()
|
||||
|
|
|
@ -12,7 +12,7 @@ dependencies {
|
|||
File repoDir = file("$buildDir/testclusters/repo")
|
||||
|
||||
task 'leader-cluster'(type: RestIntegTestTask) {
|
||||
mustRunAfter(precommit)
|
||||
mustRunAfter("precommit")
|
||||
systemProperty 'tests.target_cluster', 'leader'
|
||||
/* To support taking index snapshots, we have to set path.repo setting */
|
||||
systemProperty 'tests.path.repo', repoDir.absolutePath
|
||||
|
|
|
@ -98,12 +98,4 @@ project.afterEvaluate {
|
|||
}
|
||||
}
|
||||
|
||||
def checkTask = tasks.named("check")
|
||||
// add all sub-projects of the qa sub-project
|
||||
gradle.projectsEvaluated {
|
||||
project.subprojects
|
||||
.find { it.path == project.path + ":qa" }
|
||||
.subprojects
|
||||
.findAll { it.path.startsWith(project.path + ":qa") }
|
||||
.each { subProj -> checkTask.configure { dependsOn subProj.tasks.named("check") } }
|
||||
}
|
||||
addQaCheckDependencies()
|
||||
|
|
|
@ -12,25 +12,18 @@ dependencies {
|
|||
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
||||
}
|
||||
|
||||
// add all sub-projects of the qa sub-project
|
||||
gradle.projectsEvaluated {
|
||||
project.subprojects
|
||||
.find { it.path == project.path + ":qa" }
|
||||
.subprojects
|
||||
.findAll { it.path.startsWith(project.path + ":qa") }
|
||||
.each { check.dependsOn it.check }
|
||||
}
|
||||
addQaCheckDependencies()
|
||||
|
||||
configurations {
|
||||
testArtifacts.extendsFrom testRuntime
|
||||
testArtifacts.extendsFrom testImplementation
|
||||
}
|
||||
|
||||
task testJar(type: Jar) {
|
||||
def testJarTaskProvider = tasks.register("testJar", Jar) {
|
||||
appendix 'test'
|
||||
from sourceSets.test.output
|
||||
}
|
||||
|
||||
artifacts {
|
||||
testArtifacts testJar
|
||||
testArtifacts testJarTaskProvider
|
||||
}
|
||||
|
|
|
@ -94,7 +94,7 @@ Map<String, Object> expansions = [
|
|||
'base_path': gcsBasePath + "_integration_tests"
|
||||
]
|
||||
|
||||
processTestResources {
|
||||
tasks.named("processTestResources").configure {
|
||||
inputs.properties(expansions)
|
||||
MavenFilteringHack.filter(it, expansions)
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ if (useFixture) {
|
|||
}
|
||||
|
||||
integTest {
|
||||
dependsOn repositoryPlugin.bundlePlugin
|
||||
dependsOn ":plugins:repository-gcs:bundlePlugin"
|
||||
systemProperty 'test.gcs.bucket', gcsBucket
|
||||
nonInputProperties.systemProperty 'test.gcs.base_path', gcsBasePath + "_repositories_metering" + BuildParams.testSeed
|
||||
}
|
||||
|
@ -125,6 +125,6 @@ testClusters.integTest {
|
|||
}
|
||||
}
|
||||
|
||||
task gcsThirdPartyTest {
|
||||
tasks.register("gcsThirdPartyTest").configure {
|
||||
dependsOn integTest
|
||||
}
|
||||
|
|
|
@ -6,7 +6,8 @@ dependencies {
|
|||
api project(":test:framework")
|
||||
}
|
||||
|
||||
test.enabled = false // We don't currently have any tests for this because they are test utilities.
|
||||
// We don't currently have any tests for this because they are test utilities.
|
||||
tasks.named("test").configure { enabled = false }
|
||||
|
||||
subprojects {
|
||||
if (project.name.startsWith('core-with-')) {
|
||||
|
|
|
@ -13,14 +13,7 @@ dependencies {
|
|||
internalClusterTestImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
||||
}
|
||||
|
||||
// add all sub-projects of the qa sub-project
|
||||
gradle.projectsEvaluated {
|
||||
project.subprojects
|
||||
.find { it.path == project.path + ":qa" }
|
||||
.subprojects
|
||||
.findAll { it.path.startsWith(project.path + ":qa") }
|
||||
.each { check.dependsOn it.check }
|
||||
}
|
||||
addQaCheckDependencies()
|
||||
|
||||
configurations {
|
||||
testArtifacts.extendsFrom testRuntime
|
||||
|
|
|
@ -131,15 +131,16 @@ dependencies {
|
|||
testImplementation('org.apache.directory.mavibot:mavibot:1.0.0-M8')
|
||||
}
|
||||
|
||||
compileJava.options.compilerArgs << "-Xlint:-rawtypes,-unchecked"
|
||||
compileTestJava.options.compilerArgs << "-Xlint:-rawtypes,-unchecked"
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
options.compilerArgs << "-Xlint:-rawtypes,-unchecked"
|
||||
}
|
||||
|
||||
processInternalClusterTestResources {
|
||||
tasks.named("processInternalClusterTestResources").configure {
|
||||
from(project(xpackModule('core')).file('src/main/config'))
|
||||
from(project(xpackModule('core')).file('src/test/resources'))
|
||||
}
|
||||
|
||||
processTestResources {
|
||||
tasks.named("processTestResources").configure {
|
||||
from(project(xpackModule('core')).file('src/main/config'))
|
||||
from(project(xpackModule('core')).file('src/test/resources'))
|
||||
}
|
||||
|
@ -164,7 +165,7 @@ tasks.named("dependencyLicenses").configure {
|
|||
mapping from: /http.*/, to: 'httpclient'
|
||||
}
|
||||
|
||||
forbiddenPatterns {
|
||||
tasks.named("forbiddenPatterns").configure {
|
||||
exclude '**/*.key'
|
||||
exclude '**/*.p12'
|
||||
exclude '**/*.der'
|
||||
|
@ -176,7 +177,7 @@ tasks.named('forbiddenApisMain').configure {
|
|||
}
|
||||
|
||||
// classes are missing, e.g. com.ibm.icu.lang.UCharacter
|
||||
thirdPartyAudit {
|
||||
tasks.named("thirdPartyAudit").configure {
|
||||
ignoreMissingClasses(
|
||||
// SAML dependencies
|
||||
// [missing classes] Some cli utilities that we don't use depend on these missing JCommander classes
|
||||
|
@ -453,23 +454,25 @@ thirdPartyAudit {
|
|||
)
|
||||
}
|
||||
|
||||
thirdPartyAudit.ignoreMissingClasses(
|
||||
'javax.xml.bind.JAXBContext',
|
||||
'javax.xml.bind.JAXBElement',
|
||||
'javax.xml.bind.JAXBException',
|
||||
'javax.xml.bind.Unmarshaller',
|
||||
'javax.xml.bind.UnmarshallerHandler',
|
||||
// Optional dependencies of oauth2-oidc-sdk
|
||||
'com.nimbusds.common.contenttype.ContentType',
|
||||
'javax.activation.ActivationDataFlavor',
|
||||
'javax.activation.DataContentHandler',
|
||||
'javax.activation.DataHandler',
|
||||
'javax.activation.DataSource',
|
||||
'javax.activation.FileDataSource',
|
||||
'javax.activation.FileTypeMap'
|
||||
)
|
||||
tasks.named("thirdPartyAudit").configure {
|
||||
ignoreMissingClasses(
|
||||
'javax.xml.bind.JAXBContext',
|
||||
'javax.xml.bind.JAXBElement',
|
||||
'javax.xml.bind.JAXBException',
|
||||
'javax.xml.bind.Unmarshaller',
|
||||
'javax.xml.bind.UnmarshallerHandler',
|
||||
// Optional dependencies of oauth2-oidc-sdk
|
||||
'com.nimbusds.common.contenttype.ContentType',
|
||||
'javax.activation.ActivationDataFlavor',
|
||||
'javax.activation.DataContentHandler',
|
||||
'javax.activation.DataHandler',
|
||||
'javax.activation.DataSource',
|
||||
'javax.activation.FileDataSource',
|
||||
'javax.activation.FileTypeMap'
|
||||
)
|
||||
}
|
||||
|
||||
test {
|
||||
tasks.named("test").configure {
|
||||
/*
|
||||
* 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.
|
||||
|
@ -491,11 +494,4 @@ internalClusterTest {
|
|||
systemProperty 'es.transport.buffer.size', '256k'
|
||||
}
|
||||
|
||||
// add all sub-projects of the qa sub-project
|
||||
gradle.projectsEvaluated {
|
||||
project.subprojects
|
||||
.find { it.path == project.path + ":qa" }
|
||||
.subprojects
|
||||
.findAll { it.path.startsWith(project.path + ":qa") }
|
||||
.each { check.dependsOn it.check }
|
||||
}
|
||||
addQaCheckDependencies()
|
||||
|
|
|
@ -23,12 +23,12 @@ tasks.named("dependencyLicenses").configure {
|
|||
mapping from: /bc.*/, to: 'bouncycastle'
|
||||
}
|
||||
|
||||
forbiddenPatterns {
|
||||
tasks.named("forbiddenPatterns").configure {
|
||||
exclude '**/*.p12'
|
||||
exclude '**/*.jks'
|
||||
}
|
||||
|
||||
thirdPartyAudit {
|
||||
tasks.named("thirdPartyAudit").configure {
|
||||
ignoreMissingClasses(
|
||||
// Used in org.bouncycastle.pqc.crypto.qtesla.QTeslaKeyEncodingTests
|
||||
'junit.framework.Assert',
|
||||
|
@ -37,9 +37,15 @@ thirdPartyAudit {
|
|||
}
|
||||
|
||||
if (BuildParams.inFipsJvm) {
|
||||
test.enabled = false
|
||||
jarHell.enabled = false
|
||||
testingConventions.enabled = false
|
||||
tasks.named("test").configure {
|
||||
enabled = false
|
||||
}
|
||||
tasks.named("jarHell").configure {
|
||||
enabled = false
|
||||
}
|
||||
tasks.named("testingConventions").configure {
|
||||
enabled = false
|
||||
}
|
||||
// Forbiden APIs non-portable checks fail because bouncy castle classes being used from the FIPS JDK since those are
|
||||
// not part of the Java specification - all of this is as designed, so we have to relax this check for FIPS.
|
||||
tasks.withType(CheckForbiddenApis).configureEach {
|
||||
|
|
|
@ -48,21 +48,13 @@ dependencies {
|
|||
* in $ES_HOME/bin/x-pack/. This is useful because it is an
|
||||
* executable jar that can be moved wherever it is needed.
|
||||
*/
|
||||
bundlePlugin {
|
||||
tasks.named("bundlePlugin").configure {
|
||||
from(configurations.bin) {
|
||||
into 'bin'
|
||||
}
|
||||
}
|
||||
|
||||
// add all sub-projects of the qa sub-project
|
||||
gradle.projectsEvaluated {
|
||||
project.subprojects
|
||||
.find { it.path == project.path + ":qa" }
|
||||
.subprojects
|
||||
.findAll { it.path.startsWith(project.path + ":qa") }
|
||||
.each { check.dependsOn it.check }
|
||||
}
|
||||
|
||||
addQaCheckDependencies()
|
||||
|
||||
/**********************************************
|
||||
* SQL Parser regeneration *
|
||||
|
@ -134,7 +126,7 @@ tasks.register("regen") {
|
|||
}
|
||||
|
||||
allprojects {
|
||||
task checkNoBwc {
|
||||
tasks.register("checkNoBwc") {
|
||||
dependsOn tasks.withType(Test).matching { it.name.contains('bwc') == false }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ tasks.named("dependencyLicenses").configure {
|
|||
mapping from: /jackson-.*/, to: 'jackson'
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
tasks.named("shadowJar").configure {
|
||||
relocate 'com.fasterxml', 'shadow.fasterxml'
|
||||
relocate('org.elasticsearch', 'shadow.org.elasticsearch') {
|
||||
// Don't relocate the JDBC driver classes themselves as that's (mostly) public API
|
||||
|
@ -42,10 +42,12 @@ shadowJar {
|
|||
}
|
||||
}
|
||||
|
||||
thirdPartyAudit.ignoreMissingClasses(
|
||||
'com.fasterxml.jackson.databind.ObjectMapper',
|
||||
'com.fasterxml.jackson.databind.cfg.MapperBuilder'
|
||||
)
|
||||
tasks.named("thirdPartyAudit").configure {
|
||||
ignoreMissingClasses(
|
||||
'com.fasterxml.jackson.databind.ObjectMapper',
|
||||
'com.fasterxml.jackson.databind.cfg.MapperBuilder'
|
||||
)
|
||||
}
|
||||
|
||||
tasks.named("test").configure {
|
||||
// reset the unit test classpath as using the shadow jar won't work due to relocated packages
|
||||
|
|
|
@ -22,7 +22,9 @@ dependencies {
|
|||
}
|
||||
|
||||
// disable unit tests because these are all integration tests used other qa projects
|
||||
test.enabled = false
|
||||
tasks.named("test").configure {
|
||||
enabled = false
|
||||
}
|
||||
|
||||
subprojects {
|
||||
if (subprojects.isEmpty()) {
|
||||
|
@ -63,7 +65,7 @@ subprojects {
|
|||
setting 'xpack.watcher.enabled', 'false'
|
||||
}
|
||||
|
||||
integTest {
|
||||
tasks.named("integTest").configure {
|
||||
classpath += configurations.jdbcDriver
|
||||
systemProperty 'jdbc.driver.version', VersionProperties.elasticsearch
|
||||
}
|
||||
|
@ -89,7 +91,7 @@ subprojects {
|
|||
"jdbcDriver${baseName}"(driverDependency)
|
||||
}
|
||||
|
||||
tasks.create(bwcTaskName(bwcVersion), RestIntegTestTask) {
|
||||
tasks.register(bwcTaskName(bwcVersion), RestIntegTestTask) {
|
||||
classpath += driverConfiguration
|
||||
systemProperty 'jdbc.driver.version', bwcVersion.toString()
|
||||
}
|
||||
|
|
|
@ -38,100 +38,102 @@ tasks.named("dependencyLicenses").configure {
|
|||
mapping from: /lucene-.*/, to: 'lucene'
|
||||
}
|
||||
|
||||
thirdPartyAudit.ignoreMissingClasses(
|
||||
'com.fasterxml.jackson.dataformat.yaml.YAMLFactory',
|
||||
'com.fasterxml.jackson.dataformat.yaml.YAMLMapper',
|
||||
tasks.named("thirdPartyAudit").configure {
|
||||
ignoreMissingClasses(
|
||||
'com.fasterxml.jackson.dataformat.yaml.YAMLFactory',
|
||||
'com.fasterxml.jackson.dataformat.yaml.YAMLMapper',
|
||||
|
||||
// from com.fasterxml.jackson.dataformat.yaml.YAMLMapper (jackson-dataformat-yaml)
|
||||
'com.fasterxml.jackson.databind.ObjectMapper',
|
||||
'org.fusesource.jansi.Ansi',
|
||||
'org.fusesource.jansi.AnsiRenderer$Code',
|
||||
// from com.fasterxml.jackson.dataformat.yaml.YAMLMapper (jackson-dataformat-yaml)
|
||||
'com.fasterxml.jackson.databind.ObjectMapper',
|
||||
'org.fusesource.jansi.Ansi',
|
||||
'org.fusesource.jansi.AnsiRenderer$Code',
|
||||
|
||||
// from log4j
|
||||
'com.conversantmedia.util.concurrent.DisruptorBlockingQueue',
|
||||
'com.conversantmedia.util.concurrent.SpinPolicy',
|
||||
'com.fasterxml.jackson.annotation.JsonInclude$Include',
|
||||
'com.fasterxml.jackson.databind.DeserializationContext',
|
||||
'com.fasterxml.jackson.databind.DeserializationFeature',
|
||||
'com.fasterxml.jackson.databind.JsonMappingException',
|
||||
'com.fasterxml.jackson.databind.JsonNode',
|
||||
'com.fasterxml.jackson.databind.Module$SetupContext',
|
||||
'com.fasterxml.jackson.databind.ObjectReader',
|
||||
'com.fasterxml.jackson.databind.ObjectWriter',
|
||||
'com.fasterxml.jackson.databind.SerializerProvider',
|
||||
'com.fasterxml.jackson.databind.deser.std.StdDeserializer',
|
||||
'com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer',
|
||||
'com.fasterxml.jackson.databind.module.SimpleModule',
|
||||
'com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter',
|
||||
'com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider',
|
||||
'com.fasterxml.jackson.databind.ser.std.StdScalarSerializer',
|
||||
'com.fasterxml.jackson.databind.ser.std.StdSerializer',
|
||||
'com.fasterxml.jackson.dataformat.xml.JacksonXmlModule',
|
||||
'com.fasterxml.jackson.dataformat.xml.XmlMapper',
|
||||
'com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter',
|
||||
'com.lmax.disruptor.BlockingWaitStrategy',
|
||||
'com.lmax.disruptor.BusySpinWaitStrategy',
|
||||
'com.lmax.disruptor.EventFactory',
|
||||
'com.lmax.disruptor.EventTranslator',
|
||||
'com.lmax.disruptor.EventTranslatorTwoArg',
|
||||
'com.lmax.disruptor.EventTranslatorVararg',
|
||||
'com.lmax.disruptor.ExceptionHandler',
|
||||
'com.lmax.disruptor.LifecycleAware',
|
||||
'com.lmax.disruptor.RingBuffer',
|
||||
'com.lmax.disruptor.Sequence',
|
||||
'com.lmax.disruptor.SequenceReportingEventHandler',
|
||||
'com.lmax.disruptor.SleepingWaitStrategy',
|
||||
'com.lmax.disruptor.TimeoutBlockingWaitStrategy',
|
||||
'com.lmax.disruptor.WaitStrategy',
|
||||
'com.lmax.disruptor.YieldingWaitStrategy',
|
||||
'com.lmax.disruptor.dsl.Disruptor',
|
||||
'com.lmax.disruptor.dsl.ProducerType',
|
||||
'javax.jms.Connection',
|
||||
'javax.jms.ConnectionFactory',
|
||||
'javax.jms.Destination',
|
||||
'javax.jms.JMSException',
|
||||
'javax.jms.MapMessage',
|
||||
'javax.jms.Message',
|
||||
'javax.jms.MessageConsumer',
|
||||
'javax.jms.MessageProducer',
|
||||
'javax.jms.Session',
|
||||
'javax.mail.Authenticator',
|
||||
'javax.mail.Message$RecipientType',
|
||||
'javax.mail.PasswordAuthentication',
|
||||
'javax.mail.Session',
|
||||
'javax.mail.Transport',
|
||||
'javax.mail.internet.InternetAddress',
|
||||
'javax.mail.internet.InternetHeaders',
|
||||
'javax.mail.internet.MimeBodyPart',
|
||||
'javax.mail.internet.MimeMessage',
|
||||
'javax.mail.internet.MimeMultipart',
|
||||
'javax.mail.internet.MimeUtility',
|
||||
'javax.mail.util.ByteArrayDataSource',
|
||||
'org.apache.commons.compress.compressors.CompressorStreamFactory',
|
||||
'org.apache.commons.compress.utils.IOUtils',
|
||||
'org.apache.commons.csv.CSVFormat',
|
||||
'org.apache.commons.csv.QuoteMode',
|
||||
'org.apache.kafka.clients.producer.Callback',
|
||||
'org.apache.kafka.clients.producer.KafkaProducer',
|
||||
'org.apache.kafka.clients.producer.Producer',
|
||||
'org.apache.kafka.clients.producer.ProducerRecord',
|
||||
'org.apache.kafka.clients.producer.RecordMetadata',
|
||||
'org.codehaus.stax2.XMLStreamWriter2',
|
||||
'org.jctools.queues.MessagePassingQueue$Consumer',
|
||||
'org.jctools.queues.MpscArrayQueue',
|
||||
'org.osgi.framework.AdaptPermission',
|
||||
'org.osgi.framework.AdminPermission',
|
||||
'org.osgi.framework.Bundle',
|
||||
'org.osgi.framework.BundleActivator',
|
||||
'org.osgi.framework.BundleContext',
|
||||
'org.osgi.framework.BundleEvent',
|
||||
'org.osgi.framework.BundleReference',
|
||||
'org.osgi.framework.FrameworkUtil',
|
||||
'org.osgi.framework.ServiceRegistration',
|
||||
'org.osgi.framework.SynchronousBundleListener',
|
||||
'org.osgi.framework.wiring.BundleWire',
|
||||
'org.osgi.framework.wiring.BundleWiring',
|
||||
'org.zeromq.ZMQ$Context',
|
||||
'org.zeromq.ZMQ$Socket',
|
||||
'org.zeromq.ZMQ'
|
||||
)
|
||||
// from log4j
|
||||
'com.conversantmedia.util.concurrent.DisruptorBlockingQueue',
|
||||
'com.conversantmedia.util.concurrent.SpinPolicy',
|
||||
'com.fasterxml.jackson.annotation.JsonInclude$Include',
|
||||
'com.fasterxml.jackson.databind.DeserializationContext',
|
||||
'com.fasterxml.jackson.databind.DeserializationFeature',
|
||||
'com.fasterxml.jackson.databind.JsonMappingException',
|
||||
'com.fasterxml.jackson.databind.JsonNode',
|
||||
'com.fasterxml.jackson.databind.Module$SetupContext',
|
||||
'com.fasterxml.jackson.databind.ObjectReader',
|
||||
'com.fasterxml.jackson.databind.ObjectWriter',
|
||||
'com.fasterxml.jackson.databind.SerializerProvider',
|
||||
'com.fasterxml.jackson.databind.deser.std.StdDeserializer',
|
||||
'com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer',
|
||||
'com.fasterxml.jackson.databind.module.SimpleModule',
|
||||
'com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter',
|
||||
'com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider',
|
||||
'com.fasterxml.jackson.databind.ser.std.StdScalarSerializer',
|
||||
'com.fasterxml.jackson.databind.ser.std.StdSerializer',
|
||||
'com.fasterxml.jackson.dataformat.xml.JacksonXmlModule',
|
||||
'com.fasterxml.jackson.dataformat.xml.XmlMapper',
|
||||
'com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter',
|
||||
'com.lmax.disruptor.BlockingWaitStrategy',
|
||||
'com.lmax.disruptor.BusySpinWaitStrategy',
|
||||
'com.lmax.disruptor.EventFactory',
|
||||
'com.lmax.disruptor.EventTranslator',
|
||||
'com.lmax.disruptor.EventTranslatorTwoArg',
|
||||
'com.lmax.disruptor.EventTranslatorVararg',
|
||||
'com.lmax.disruptor.ExceptionHandler',
|
||||
'com.lmax.disruptor.LifecycleAware',
|
||||
'com.lmax.disruptor.RingBuffer',
|
||||
'com.lmax.disruptor.Sequence',
|
||||
'com.lmax.disruptor.SequenceReportingEventHandler',
|
||||
'com.lmax.disruptor.SleepingWaitStrategy',
|
||||
'com.lmax.disruptor.TimeoutBlockingWaitStrategy',
|
||||
'com.lmax.disruptor.WaitStrategy',
|
||||
'com.lmax.disruptor.YieldingWaitStrategy',
|
||||
'com.lmax.disruptor.dsl.Disruptor',
|
||||
'com.lmax.disruptor.dsl.ProducerType',
|
||||
'javax.jms.Connection',
|
||||
'javax.jms.ConnectionFactory',
|
||||
'javax.jms.Destination',
|
||||
'javax.jms.JMSException',
|
||||
'javax.jms.MapMessage',
|
||||
'javax.jms.Message',
|
||||
'javax.jms.MessageConsumer',
|
||||
'javax.jms.MessageProducer',
|
||||
'javax.jms.Session',
|
||||
'javax.mail.Authenticator',
|
||||
'javax.mail.Message$RecipientType',
|
||||
'javax.mail.PasswordAuthentication',
|
||||
'javax.mail.Session',
|
||||
'javax.mail.Transport',
|
||||
'javax.mail.internet.InternetAddress',
|
||||
'javax.mail.internet.InternetHeaders',
|
||||
'javax.mail.internet.MimeBodyPart',
|
||||
'javax.mail.internet.MimeMessage',
|
||||
'javax.mail.internet.MimeMultipart',
|
||||
'javax.mail.internet.MimeUtility',
|
||||
'javax.mail.util.ByteArrayDataSource',
|
||||
'org.apache.commons.compress.compressors.CompressorStreamFactory',
|
||||
'org.apache.commons.compress.utils.IOUtils',
|
||||
'org.apache.commons.csv.CSVFormat',
|
||||
'org.apache.commons.csv.QuoteMode',
|
||||
'org.apache.kafka.clients.producer.Callback',
|
||||
'org.apache.kafka.clients.producer.KafkaProducer',
|
||||
'org.apache.kafka.clients.producer.Producer',
|
||||
'org.apache.kafka.clients.producer.ProducerRecord',
|
||||
'org.apache.kafka.clients.producer.RecordMetadata',
|
||||
'org.codehaus.stax2.XMLStreamWriter2',
|
||||
'org.jctools.queues.MessagePassingQueue$Consumer',
|
||||
'org.jctools.queues.MpscArrayQueue',
|
||||
'org.osgi.framework.AdaptPermission',
|
||||
'org.osgi.framework.AdminPermission',
|
||||
'org.osgi.framework.Bundle',
|
||||
'org.osgi.framework.BundleActivator',
|
||||
'org.osgi.framework.BundleContext',
|
||||
'org.osgi.framework.BundleEvent',
|
||||
'org.osgi.framework.BundleReference',
|
||||
'org.osgi.framework.FrameworkUtil',
|
||||
'org.osgi.framework.ServiceRegistration',
|
||||
'org.osgi.framework.SynchronousBundleListener',
|
||||
'org.osgi.framework.wiring.BundleWire',
|
||||
'org.osgi.framework.wiring.BundleWiring',
|
||||
'org.zeromq.ZMQ$Context',
|
||||
'org.zeromq.ZMQ$Socket',
|
||||
'org.zeromq.ZMQ'
|
||||
)
|
||||
}
|
|
@ -15,12 +15,4 @@ dependencies {
|
|||
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
||||
}
|
||||
|
||||
// add all sub-projects of the qa sub-project
|
||||
gradle.projectsEvaluated {
|
||||
project.subprojects
|
||||
.find { it.path == project.path + ":qa" }
|
||||
.subprojects
|
||||
.findAll { it.path.startsWith(project.path + ":qa") }
|
||||
.each { check.dependsOn it.check }
|
||||
}
|
||||
|
||||
addQaCheckDependencies()
|
|
@ -16,11 +16,4 @@ dependencies {
|
|||
testImplementation project(path: ':modules:aggs-matrix-stats')
|
||||
}
|
||||
|
||||
// add all sub-projects of the qa sub-project
|
||||
gradle.projectsEvaluated {
|
||||
project.subprojects
|
||||
.find { it.path == project.path + ":qa" }
|
||||
.subprojects
|
||||
.findAll { it.path.startsWith(project.path + ":qa") }
|
||||
.each { check.dependsOn it.check }
|
||||
}
|
||||
addQaCheckDependencies()
|
||||
|
|
|
@ -2,13 +2,12 @@
|
|||
* artifacts for them. */
|
||||
gradle.projectsEvaluated {
|
||||
subprojects {
|
||||
Task assemble = project.tasks.findByName('assemble')
|
||||
if (assemble) {
|
||||
assemble.enabled = false
|
||||
project.tasks.matching { it.name.equals('assemble') }.configureEach {
|
||||
enabled = false
|
||||
}
|
||||
Task dependenciesInfo = project.tasks.findByName('dependenciesInfo')
|
||||
if (dependenciesInfo) {
|
||||
dependenciesInfo.enabled = false
|
||||
|
||||
project.tasks.matching { it.name.equals('dependenciesInfo') }.configureEach {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,8 +13,9 @@ archivesBaseName = 'x-pack-watcher'
|
|||
|
||||
ext.compactProfile = 'full'
|
||||
|
||||
compileJava.options.compilerArgs << "-Xlint:-rawtypes,-unchecked"
|
||||
compileTestJava.options.compilerArgs << "-Xlint:-rawtypes,-unchecked"
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
options.compilerArgs << "-Xlint:-rawtypes,-unchecked"
|
||||
}
|
||||
|
||||
tasks.named("dependencyLicenses").configure {
|
||||
mapping from: /owasp-java-html-sanitizer.*/, to: 'owasp-java-html-sanitizer'
|
||||
|
@ -45,7 +46,7 @@ dependencies {
|
|||
}
|
||||
|
||||
// classes are missing, e.g. com.ibm.icu.lang.UCharacter
|
||||
thirdPartyAudit {
|
||||
tasks.named("thirdPartyAudit").configure {
|
||||
ignoreViolations(
|
||||
// uses internal java api: sun.misc.Unsafe
|
||||
'com.google.common.cache.Striped64',
|
||||
|
@ -76,7 +77,7 @@ thirdPartyAudit {
|
|||
)
|
||||
}
|
||||
|
||||
forbiddenPatterns {
|
||||
tasks.named("forbiddenPatterns").configure {
|
||||
exclude '**/*.p12'
|
||||
}
|
||||
|
||||
|
@ -88,11 +89,4 @@ internalClusterTest {
|
|||
systemProperty 'es.set.netty.runtime.available.processors', 'false'
|
||||
}
|
||||
|
||||
// add all sub-projects of the qa sub-project
|
||||
gradle.projectsEvaluated {
|
||||
project.subprojects
|
||||
.find { it.path == project.path + ":qa" }
|
||||
.subprojects
|
||||
.findAll { it.path.startsWith(project.path + ":qa") }
|
||||
.each { check.dependsOn it.check }
|
||||
}
|
||||
addQaCheckDependencies()
|
||||
|
|
|
@ -69,7 +69,7 @@ for (Version bwcVersion : BuildParams.bwcVersions.indexCompatible) {
|
|||
}
|
||||
|
||||
tasks.register("${baseName}#oldClusterTest", StandaloneRestIntegTestTask) {
|
||||
mustRunAfter(precommit)
|
||||
mustRunAfter("precommit")
|
||||
useCluster testClusters."${baseName}"
|
||||
dependsOn copyTestNodeKeyMaterial
|
||||
doFirst {
|
||||
|
@ -83,7 +83,7 @@ for (Version bwcVersion : BuildParams.bwcVersions.indexCompatible) {
|
|||
|
||||
|
||||
tasks.register("${baseName}#upgradedClusterTest", StandaloneRestIntegTestTask) {
|
||||
mustRunAfter(precommit)
|
||||
mustRunAfter("precommit")
|
||||
useCluster testClusters."${baseName}"
|
||||
dependsOn "${baseName}#oldClusterTest"
|
||||
doFirst {
|
||||
|
|
|
@ -43,7 +43,7 @@ for (Version bwcVersion : BuildParams.bwcVersions.wireCompatible.findAll { it.on
|
|||
|
||||
tasks.register("${baseName}#mixedClusterTest", StandaloneRestIntegTestTask) {
|
||||
useCluster testClusters."${baseName}"
|
||||
mustRunAfter(precommit)
|
||||
mustRunAfter("precommit")
|
||||
doFirst {
|
||||
// Getting the endpoints causes a wait for the cluster
|
||||
println "Endpoints are: ${-> testClusters."${baseName}".allHttpSocketURI.join(",")}"
|
||||
|
|
|
@ -15,7 +15,7 @@ restResources {
|
|||
}
|
||||
|
||||
task 'remote-cluster'(type: RestIntegTestTask) {
|
||||
mustRunAfter(precommit)
|
||||
mustRunAfter("precommit")
|
||||
systemProperty 'tests.rest.suite', 'remote_cluster'
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ restResources {
|
|||
}
|
||||
|
||||
task 'remote-cluster'(type: RestIntegTestTask) {
|
||||
mustRunAfter(precommit)
|
||||
mustRunAfter("precommit")
|
||||
systemProperty 'tests.rest.suite', 'remote_cluster'
|
||||
}
|
||||
|
||||
|
|
|
@ -13,4 +13,4 @@ dependencies {
|
|||
testFixtures.useFixture ":x-pack:test:idp-fixture", "oidc-provider"
|
||||
testFixtures.useFixture ":x-pack:test:idp-fixture", "elasticsearch-node"
|
||||
|
||||
thirdPartyAudit.enabled = false
|
||||
tasks.named("thirdPartyAudit").configure { enabled = false }
|
||||
|
|
|
@ -29,7 +29,7 @@ for (Version bwcVersion : BuildParams.bwcVersions.wireCompatible) {
|
|||
|
||||
tasks.register("${baseName}#oldClusterTest", StandaloneRestIntegTestTask) {
|
||||
useCluster testClusters."${baseName}"
|
||||
mustRunAfter(precommit)
|
||||
mustRunAfter("precommit")
|
||||
systemProperty 'tests.rest.suite', 'old_cluster'
|
||||
systemProperty 'tests.upgrade_from_version', version.toString().replace('-SNAPSHOT', '')
|
||||
nonInputProperties.systemProperty('tests.rest.cluster', "${-> testClusters."${baseName}".allHttpSocketURI.join(",")}")
|
||||
|
|
|
@ -74,7 +74,7 @@ for (Version bwcVersion : BuildParams.bwcVersions.wireCompatible) {
|
|||
ext.kindExt = kind
|
||||
}
|
||||
|
||||
tasks.create("${baseName}#${kind}#upgradedClusterTest", StandaloneRestIntegTestTask) {
|
||||
tasks.register("${baseName}#${kind}#upgradedClusterTest", StandaloneRestIntegTestTask) {
|
||||
systemProperty 'tests.rest.upgrade_state', 'all'
|
||||
systemProperty 'tests.rest.cluster_name', kind
|
||||
dependsOn "${baseName}#${kind}#twoThirdsUpgradedTest"
|
||||
|
|
|
@ -89,7 +89,7 @@ for (Version bwcVersion : BuildParams.bwcVersions.wireCompatible) {
|
|||
|
||||
tasks.register("${baseName}#oldClusterTest", StandaloneRestIntegTestTask) {
|
||||
useCluster testClusters."${baseName}"
|
||||
mustRunAfter(precommit)
|
||||
mustRunAfter("precommit")
|
||||
dependsOn "copyTestNodeKeyMaterial"
|
||||
systemProperty 'tests.rest.suite', 'old_cluster'
|
||||
systemProperty 'tests.upgrade_from_version', version.toString().replace('-SNAPSHOT', '')
|
||||
|
|
|
@ -8,16 +8,16 @@ dependencies {
|
|||
}
|
||||
|
||||
// add test resources from security, so certificate tool tests can use example certs
|
||||
processTestResources {
|
||||
tasks.named("processTestResources").configure {
|
||||
from(project(xpackModule('security')).sourceSets.test.resources.srcDirs)
|
||||
}
|
||||
|
||||
// we have to repeate these patterns because the security test resources are effectively in the src of this project
|
||||
forbiddenPatterns {
|
||||
tasks.named("forbiddenPatterns").configure {
|
||||
exclude '**/*.key'
|
||||
exclude '**/*.p12'
|
||||
exclude '**/*.der'
|
||||
}
|
||||
|
||||
// these are just tests, no need to audit
|
||||
thirdPartyAudit.enabled = false
|
||||
tasks.named("thirdPartyAudit").configure { enabled = false }
|
||||
|
|
|
@ -9,20 +9,20 @@ dependencies {
|
|||
testFixtures.useFixture ":x-pack:test:smb-fixture"
|
||||
|
||||
// add test resources from security, so tests can use example certs
|
||||
processTestResources {
|
||||
tasks.named("processTestResources").configure {
|
||||
duplicatesStrategy = DuplicatesStrategy.INCLUDE
|
||||
from(project(xpackModule('core')).sourceSets.test.resources.srcDirs)
|
||||
from(project(xpackModule('security')).sourceSets.test.resources.srcDirs)
|
||||
}
|
||||
|
||||
// we have to repeat these patterns because the security test resources are effectively in the src of this p
|
||||
forbiddenPatterns {
|
||||
tasks.named("forbiddenPatterns").configure {
|
||||
exclude '**/*.key'
|
||||
exclude '**/*.p12'
|
||||
exclude '**/*.der'
|
||||
}
|
||||
|
||||
test {
|
||||
tasks.named("test").configure {
|
||||
/*
|
||||
* 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.
|
||||
|
@ -31,4 +31,3 @@ test {
|
|||
include '**/*IT.class'
|
||||
include '**/*Tests.class'
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue