Port QA projects to use javaRestTest and yamlRestTest (#86703)
Do not use deprecated elasticsearch.rest-test plugin
This commit is contained in:
parent
84007244dc
commit
5604f80958
|
@ -5,16 +5,13 @@
|
|||
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||
* Side Public License, v 1.
|
||||
*/
|
||||
apply plugin: 'elasticsearch.internal-testclusters'
|
||||
apply plugin: 'elasticsearch.standalone-rest-test'
|
||||
apply plugin: 'elasticsearch.rest-test'
|
||||
apply plugin: 'elasticsearch.test-with-dependencies'
|
||||
apply plugin: 'elasticsearch.internal-java-rest-test'
|
||||
|
||||
testClusters.matching { it.name == "integTest" }.configureEach {
|
||||
testClusters.matching { it.name == "javaRestTest" }.configureEach {
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
user username: 'admin', password: 'admin-password', role: 'superuser'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation project(":client:rest-high-level")
|
||||
javaRestTestImplementation project(":client:rest-high-level")
|
||||
}
|
||||
|
|
|
@ -6,13 +6,11 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
apply plugin: 'elasticsearch.internal-testclusters'
|
||||
apply plugin: 'elasticsearch.standalone-rest-test'
|
||||
apply plugin: 'elasticsearch.rest-test'
|
||||
apply plugin: 'elasticsearch.test-with-dependencies'
|
||||
apply plugin: 'elasticsearch.internal-java-rest-test'
|
||||
//apply plugin: 'elasticsearch.test-with-dependencies'
|
||||
|
||||
dependencies {
|
||||
testImplementation "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
|
||||
javaRestTestImplementation "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
|
||||
}
|
||||
|
||||
testClusters.configureEach {
|
||||
|
|
|
@ -5,20 +5,13 @@
|
|||
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
apply plugin: 'elasticsearch.internal-testclusters'
|
||||
apply plugin: 'elasticsearch.standalone-rest-test'
|
||||
apply plugin: 'elasticsearch.rest-test'
|
||||
apply plugin: 'elasticsearch.rest-resources'
|
||||
apply plugin: 'elasticsearch.internal-yaml-rest-test'
|
||||
|
||||
dependencies {
|
||||
testImplementation project(':modules:ingest-common')
|
||||
}
|
||||
|
||||
testClusters.configureEach {
|
||||
testClusters.matching { it.name == "yamlRestTest" }.configureEach {
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
}
|
||||
|
||||
testClusters.matching { it.name == "integTest" }.configureEach {
|
||||
setting 'node.roles', '[data,master,remote_cluster_client]'
|
||||
}
|
||||
|
|
|
@ -6,27 +6,24 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
apply plugin: 'elasticsearch.internal-testclusters'
|
||||
apply plugin: 'elasticsearch.standalone-rest-test'
|
||||
apply plugin: 'elasticsearch.rest-test'
|
||||
apply plugin: 'elasticsearch.rest-resources'
|
||||
apply plugin: 'elasticsearch.internal-yaml-rest-test'
|
||||
|
||||
dependencies {
|
||||
testImplementation project(':modules:lang-mustache')
|
||||
yamlRestTestImplementation project(':modules:lang-mustache')
|
||||
}
|
||||
|
||||
testClusters.configureEach {
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
extraConfigFile 'ingest-geoip/GeoLite2-City.mmdb', file("${project.projectDir}/src/test/resources/GeoLite2-City.mmdb")
|
||||
extraConfigFile 'ingest-geoip/GeoLite2-City.mmdb', file("src/yamlRestTest/resources/GeoLite2-City.mmdb")
|
||||
}
|
||||
|
||||
tasks.named("testingConventions").configure {
|
||||
naming {
|
||||
IT {
|
||||
baseClass 'org.elasticsearch.ingest.AbstractScriptTestCase'
|
||||
}
|
||||
}
|
||||
}
|
||||
//tasks.named("testingConventions").configure {
|
||||
// naming {
|
||||
// IT {
|
||||
// baseClass 'org.elasticsearch.ingest.AbstractScriptTestCase'
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
tasks.named("forbiddenPatterns").configure {
|
||||
exclude '**/*.mmdb'
|
||||
|
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
@ -10,10 +10,7 @@
|
|||
import org.elasticsearch.gradle.Version
|
||||
import org.elasticsearch.gradle.internal.info.BuildParams
|
||||
|
||||
apply plugin: 'elasticsearch.internal-testclusters'
|
||||
apply plugin: 'elasticsearch.standalone-rest-test'
|
||||
apply plugin: 'elasticsearch.rest-test'
|
||||
apply plugin: 'elasticsearch.rest-resources'
|
||||
apply plugin: 'elasticsearch.internal-yaml-rest-test'
|
||||
|
||||
restResources {
|
||||
restTests {
|
||||
|
@ -22,7 +19,7 @@ restResources {
|
|||
}
|
||||
|
||||
File repo = file("$buildDir/testclusters/repo")
|
||||
testClusters.matching { it.name == "integTest" }.configureEach {
|
||||
testClusters.matching { it.name == "yamlRestTest" }.configureEach {
|
||||
numberOfNodes = 2
|
||||
setting 'path.repo', repo.absolutePath
|
||||
}
|
||||
|
@ -32,7 +29,7 @@ testClusters.configureEach {
|
|||
requiresFeature 'es.index_mode_feature_flag_registered', Version.fromString("8.0.0")
|
||||
}
|
||||
|
||||
tasks.named("integTest").configure {
|
||||
tasks.named("yamlRestTest").configure {
|
||||
doFirst {
|
||||
project.delete(repo)
|
||||
repo.mkdirs()
|
||||
|
|
|
@ -9,10 +9,7 @@
|
|||
import org.apache.tools.ant.filters.ReplaceTokens
|
||||
import org.elasticsearch.gradle.internal.info.BuildParams
|
||||
|
||||
apply plugin: 'elasticsearch.internal-testclusters'
|
||||
apply plugin: 'elasticsearch.standalone-rest-test'
|
||||
apply plugin: 'elasticsearch.rest-test'
|
||||
apply plugin: 'elasticsearch.rest-resources'
|
||||
apply plugin: 'elasticsearch.internal-yaml-rest-test'
|
||||
|
||||
ext.pluginPaths = []
|
||||
project(':plugins').getChildProjects().each { pluginName, pluginProject ->
|
||||
|
@ -23,7 +20,7 @@ project(':plugins').getChildProjects().each { pluginName, pluginProject ->
|
|||
pluginPaths << pluginProject.path
|
||||
}
|
||||
|
||||
testClusters.matching { it.name == "integTest" }.configureEach {
|
||||
testClusters.matching { it.name == "yamlRestTest" }.configureEach {
|
||||
pluginPaths.each { pluginPath ->
|
||||
plugin pluginPath
|
||||
}
|
||||
|
@ -34,7 +31,7 @@ ext.expansions = [
|
|||
'expected.plugins.count': pluginPaths.size()
|
||||
]
|
||||
|
||||
tasks.named("processTestResources").configure {
|
||||
tasks.named("processYamlRestTestResources").configure {
|
||||
assert pluginPaths.size() > 0
|
||||
inputs.properties(expansions)
|
||||
filter("tokens" : expansions.collectEntries {k, v -> [k, v.toString()]} /* must be a map of strings */, ReplaceTokens.class)
|
||||
|
|
|
@ -6,19 +6,17 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
apply plugin: 'elasticsearch.internal-testclusters'
|
||||
apply plugin: 'elasticsearch.standalone-rest-test'
|
||||
apply plugin: 'elasticsearch.rest-test'
|
||||
apply plugin: 'elasticsearch.internal-java-rest-test'
|
||||
|
||||
testClusters.configureEach {
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
}
|
||||
|
||||
testClusters.matching { it.name == "integTest" }.configureEach {
|
||||
testClusters.matching { it.name == "javaRestTest" }.configureEach {
|
||||
nameCustomization = { null }
|
||||
}
|
||||
|
||||
tasks.named("integTest").configure {
|
||||
tasks.named("javaRestTest").configure {
|
||||
nonInputProperties.systemProperty 'tests.logfile',
|
||||
"${-> testClusters.integTest.singleNode().getServerLog()}"
|
||||
"${-> testClusters.javaRestTest.singleNode().getServerLog()}"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue