116 lines
3.7 KiB
Groovy
116 lines
3.7 KiB
Groovy
import org.elasticsearch.gradle.test.RunTask
|
|
|
|
description = 'Integration tests for SQL'
|
|
apply plugin: 'elasticsearch.build'
|
|
archivesBaseName = 'qa-sql'
|
|
group = "org.elasticsearch.x-pack.qa.sql"
|
|
|
|
dependencies {
|
|
compile "org.elasticsearch.test:framework:${version}"
|
|
|
|
// JDBC testing dependencies
|
|
compile project(path: xpackModule('sql:jdbc'), configuration: 'nodeps')
|
|
|
|
compile project(path: xpackModule('sql:sql-action'))
|
|
compile "net.sourceforge.csvjdbc:csvjdbc:${csvjdbcVersion}"
|
|
|
|
// CLI testing dependencies
|
|
compile project(path: xpackModule('sql:sql-cli'), configuration: 'nodeps')
|
|
|
|
// H2GIS testing dependencies
|
|
compile ("org.orbisgis:h2gis:${h2gisVersion}") {
|
|
exclude group: "org.locationtech.jts"
|
|
}
|
|
|
|
// select just the parts of JLine that are needed
|
|
compile("org.jline:jline-terminal-jna:${jlineVersion}") {
|
|
exclude group: "net.java.dev.jna"
|
|
}
|
|
compile "org.jline:jline-terminal:${jlineVersion}"
|
|
compile "org.jline:jline-reader:${jlineVersion}"
|
|
compile "org.jline:jline-style:${jlineVersion}"
|
|
|
|
testRuntime "org.elasticsearch:jna:${versions.jna}"
|
|
}
|
|
|
|
/* disable unit tests because these are all integration tests used
|
|
* other qa projects. */
|
|
test.enabled = false
|
|
|
|
dependencyLicenses.enabled = false
|
|
dependenciesInfo.enabled = false
|
|
|
|
// the main files are actually test files, so use the appropriate forbidden api sigs
|
|
forbiddenApisMain {
|
|
replaceSignatureFiles 'es-all-signatures', 'es-test-signatures'
|
|
}
|
|
|
|
// just a test fixture: we aren't using this jars in releases and H2GIS requires disabling a lot of checks
|
|
thirdPartyAudit.enabled = false
|
|
|
|
subprojects {
|
|
apply plugin: 'elasticsearch.standalone-rest-test'
|
|
dependencies {
|
|
|
|
/* Since we're a standalone rest test we actually get transitive
|
|
* dependencies but we don't really want them because they cause
|
|
* all kinds of trouble with the jar hell checks. So we suppress
|
|
* them explicitly for non-es projects. */
|
|
testCompile(xpackProject('plugin:sql:qa')) {
|
|
transitive = false
|
|
}
|
|
testCompile "org.elasticsearch.test:framework:${version}"
|
|
|
|
// JDBC testing dependencies
|
|
testRuntime "net.sourceforge.csvjdbc:csvjdbc:${csvjdbcVersion}"
|
|
testRuntime "com.h2database:h2:${h2Version}"
|
|
|
|
// H2GIS testing dependencies
|
|
testRuntime ("org.orbisgis:h2gis:${h2gisVersion}") {
|
|
exclude group: "org.locationtech.jts"
|
|
}
|
|
|
|
testRuntime project(path: xpackModule('sql:jdbc'), configuration: 'nodeps')
|
|
testRuntime xpackProject('plugin:sql:sql-client')
|
|
|
|
// TODO check if needed
|
|
testRuntime("org.antlr:antlr4-runtime:${antlrVersion}") {
|
|
transitive = false
|
|
}
|
|
|
|
// CLI testing dependencies
|
|
testRuntime project(path: xpackModule('sql:sql-cli'), configuration: 'nodeps')
|
|
testRuntime (xpackProject('plugin:sql:sql-action')) {
|
|
transitive = false
|
|
}
|
|
|
|
testRuntime("org.jline:jline-terminal-jna:${jlineVersion}") {
|
|
exclude group: "net.java.dev.jna"
|
|
}
|
|
testRuntime "org.jline:jline-terminal:${jlineVersion}"
|
|
testRuntime "org.jline:jline-reader:${jlineVersion}"
|
|
testRuntime "org.jline:jline-style:${jlineVersion}"
|
|
|
|
testRuntime "org.elasticsearch:jna:${versions.jna}"
|
|
}
|
|
|
|
if (project.name != 'security') {
|
|
// The security project just configures its subprojects
|
|
apply plugin: 'elasticsearch.rest-test'
|
|
|
|
integTestCluster {
|
|
setting 'xpack.monitoring.enabled', 'false'
|
|
setting 'xpack.ml.enabled', 'false'
|
|
setting 'xpack.watcher.enabled', 'false'
|
|
setting 'script.max_compilations_rate', '1000/1m'
|
|
}
|
|
|
|
task runqa(type: RunTask) {
|
|
setting 'xpack.monitoring.enabled', 'false'
|
|
setting 'xpack.ml.enabled', 'false'
|
|
setting 'xpack.watcher.enabled', 'false'
|
|
setting 'script.max_compilations_rate', '1000/1m'
|
|
}
|
|
}
|
|
}
|