2015-11-02 12:40:47 -05:00
|
|
|
/*
|
|
|
|
* Licensed to Elasticsearch under one or more contributor
|
|
|
|
* license agreements. See the NOTICE file distributed with
|
|
|
|
* this work for additional information regarding copyright
|
|
|
|
* ownership. Elasticsearch licenses this file to you under
|
|
|
|
* the Apache License, Version 2.0 (the "License"); you may
|
|
|
|
* not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing,
|
|
|
|
* software distributed under the License is distributed on an
|
|
|
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
|
|
* KIND, either express or implied. See the License for the
|
|
|
|
* specific language governing permissions and limitations
|
|
|
|
* under the License.
|
|
|
|
*/
|
|
|
|
|
2018-04-30 19:35:26 -04:00
|
|
|
plugins {
|
2019-08-13 11:19:18 -04:00
|
|
|
id 'elasticsearch.distro-test'
|
2018-04-30 19:35:26 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compile "junit:junit:${versions.junit}"
|
2019-04-25 02:39:40 -04:00
|
|
|
compile "org.hamcrest:hamcrest:${versions.hamcrest}"
|
2018-07-18 13:26:26 -04:00
|
|
|
compile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}"
|
2018-04-30 19:35:26 -04:00
|
|
|
|
2018-07-10 11:21:20 -04:00
|
|
|
compile "org.apache.httpcomponents:httpcore:${versions.httpcore}"
|
|
|
|
compile "org.apache.httpcomponents:httpclient:${versions.httpclient}"
|
|
|
|
compile "org.apache.httpcomponents:fluent-hc:${versions.httpclient}"
|
2019-10-04 01:41:06 -04:00
|
|
|
compile "org.apache.logging.log4j:log4j-api:${versions.log4j}"
|
|
|
|
compile "org.apache.logging.log4j:log4j-core:${versions.log4j}"
|
|
|
|
compile "org.apache.logging.log4j:log4j-jcl:${versions.log4j}"
|
2018-07-10 11:21:20 -04:00
|
|
|
compile "commons-codec:commons-codec:${versions.commonscodec}"
|
|
|
|
compile "commons-logging:commons-logging:${versions.commonslogging}"
|
|
|
|
|
2019-06-04 16:50:23 -04:00
|
|
|
compile project(':libs:elasticsearch-core')
|
2019-12-04 03:57:58 -05:00
|
|
|
|
|
|
|
testCompile "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}"
|
|
|
|
testCompile "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
|
|
|
|
testCompile "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
|
2018-04-30 19:35:26 -04:00
|
|
|
}
|
2015-11-05 15:47:54 -05:00
|
|
|
|
2019-08-13 11:19:18 -04:00
|
|
|
forbiddenApisTest {
|
2018-08-22 02:05:22 -04:00
|
|
|
replaceSignatureFiles 'jdk-signatures'
|
2018-04-30 19:35:26 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// we don't have additional tests for the tests themselves
|
2019-04-09 14:52:50 -04:00
|
|
|
tasks.test.enabled = false
|
2019-01-24 10:30:50 -05:00
|
|
|
// Tests are destructive and meant to run in a VM, they don't adhere to general conventions
|
|
|
|
testingConventions.enabled = false
|
2018-04-30 19:35:26 -04:00
|
|
|
|
|
|
|
// this project doesn't get published
|
|
|
|
tasks.dependencyLicenses.enabled = false
|
|
|
|
tasks.dependenciesInfo.enabled = false
|
2018-07-10 11:21:20 -04:00
|
|
|
|
2019-11-14 06:01:23 -05:00
|
|
|
tasks.thirdPartyAudit.ignoreMissingClasses()
|
2019-08-12 19:01:53 -04:00
|
|
|
|
2019-08-13 11:19:18 -04:00
|
|
|
tasks.register('destructivePackagingTest') {
|
2020-01-27 13:49:01 -05:00
|
|
|
dependsOn 'destructiveDistroTest', 'destructiveBatsTest.oss'
|
2019-08-13 11:19:18 -04:00
|
|
|
}
|
2019-08-12 19:01:53 -04:00
|
|
|
|
2019-10-04 01:41:06 -04:00
|
|
|
processTestResources {
|
|
|
|
from project(":test:framework").file("src/main/resources/log4j2-test.properties")
|
|
|
|
}
|
|
|
|
|
2019-08-12 19:01:53 -04:00
|
|
|
subprojects { Project platformProject ->
|
2019-10-24 08:14:11 -04:00
|
|
|
tasks.register('packagingTest') {
|
|
|
|
dependsOn 'distroTest', 'batsTest.oss', 'batsTest.default'
|
2019-08-12 19:01:53 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
vagrant {
|
|
|
|
hostEnv 'VAGRANT_PROJECT_DIR', platformProject.projectDir.absolutePath
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-08-13 15:45:29 -04:00
|
|
|
List<String> pluginNames = []
|
2019-08-12 19:01:53 -04:00
|
|
|
for (Project subproj : project.rootProject.subprojects) {
|
|
|
|
if (subproj.parent.path == ':plugins' || subproj.path.equals(':example-plugins:custom-settings')) {
|
|
|
|
// add plugin as a dep
|
|
|
|
dependencies {
|
2019-08-13 15:45:29 -04:00
|
|
|
packagingPlugins project(path: "${subproj.path}", configuration: 'zip')
|
2019-08-12 19:01:53 -04:00
|
|
|
}
|
2019-08-13 15:45:29 -04:00
|
|
|
pluginNames.add(subproj.name)
|
2019-08-12 19:01:53 -04:00
|
|
|
}
|
|
|
|
}
|
2019-08-13 15:45:29 -04:00
|
|
|
pluginNames = pluginNames.toSorted()
|
2019-08-12 19:01:53 -04:00
|
|
|
|
2019-08-13 15:45:29 -04:00
|
|
|
tasks.named('copyPlugins') {
|
2019-08-12 19:01:53 -04:00
|
|
|
doLast {
|
|
|
|
// TODO: this was copied from the old way bats tests get the plugins list. we should pass
|
|
|
|
// this in differently when converting to java tests
|
|
|
|
File expectedPlugins = file('build/plugins/expected')
|
|
|
|
expectedPlugins.parentFile.mkdirs()
|
2019-08-13 15:45:29 -04:00
|
|
|
expectedPlugins.setText(pluginNames.join('\n'), 'UTF-8')
|
2019-08-12 19:01:53 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|