mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-08 05:58:44 +00:00
Move the JDBC functionality integration tests from `:sql:qa` to a separate module `:sql:qa:jdbc`. This way the tests are isolated from the rest of the integration tests and they only depend to the `:sql:jdbc` module, thus removing the danger of accidentally pulling in some dependency that may hide bugs. Moreover this is a preparation for #56722, so that we can run those tests between different JDBC and ES node versions and ensure forward compatibility. Move the rest of existing tests inside a new `:sql:qa:server` project, so that the `:sql:qa` becomes the parent project for both and one can run all the integration tests by using this parent project. (cherry picked from commit c09f4a04484b8a43934fe58fbc41bd90b7dbcc76)
116 lines
3.6 KiB
Groovy
116 lines
3.6 KiB
Groovy
description = 'Integration tests for SQL'
|
|
apply plugin: 'elasticsearch.build'
|
|
|
|
// the main files are actually test files, so use the appropriate forbidden api sigs
|
|
tasks.named('forbiddenApisMain').configure {
|
|
replaceSignatureFiles 'es-all-signatures', 'es-test-signatures'
|
|
}
|
|
|
|
dependencies {
|
|
compile project(":test:framework")
|
|
|
|
// JDBC testing dependencies
|
|
compile project(path: xpackModule('sql:jdbc'))
|
|
|
|
compile "net.sourceforge.csvjdbc:csvjdbc:${csvjdbcVersion}"
|
|
|
|
// CLI testing dependencies
|
|
compile project(path: xpackModule('sql:sql-cli'))
|
|
|
|
// 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
|
|
|
|
// just a test fixture: we aren't using this jars in releases and H2GIS requires disabling a lot of checks
|
|
thirdPartyAudit.enabled = false
|
|
|
|
subprojects {
|
|
if (subprojects.isEmpty()) {
|
|
// leaf project
|
|
apply plugin: 'elasticsearch.standalone-rest-test'
|
|
} else {
|
|
apply plugin: 'elasticsearch.build'
|
|
}
|
|
|
|
dependencies {
|
|
configurations.testRuntimeClasspath {
|
|
resolutionStrategy.force "org.slf4j:slf4j-api:1.7.25"
|
|
}
|
|
configurations.testRuntime {
|
|
// This is also required to make resolveAllDependencies work
|
|
resolutionStrategy.force "org.slf4j:slf4j-api:1.7.25"
|
|
}
|
|
|
|
/* 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:server')) {
|
|
transitive = false
|
|
}
|
|
testCompile project(":test:framework")
|
|
|
|
// 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"
|
|
exclude group: "com.fasterxml.jackson.core"
|
|
}
|
|
|
|
testRuntime project(path: xpackModule('sql:jdbc'))
|
|
testRuntime xpackProject('plugin:sql:sql-client')
|
|
|
|
// CLI testing dependencies
|
|
testRuntime project(path: xpackModule('sql:sql-cli'))
|
|
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}"
|
|
|
|
// spatial dependency
|
|
testRuntime project(path: xpackModule('spatial'))
|
|
}
|
|
|
|
if (project.name != 'security') {
|
|
// The security project just configures its subprojects
|
|
apply plugin: 'elasticsearch.testclusters'
|
|
apply plugin: 'elasticsearch.rest-test'
|
|
|
|
testClusters.integTest {
|
|
testDistribution = 'DEFAULT'
|
|
setting 'xpack.ml.enabled', 'false'
|
|
setting 'xpack.watcher.enabled', 'false'
|
|
}
|
|
}
|
|
}
|