mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-25 01:19:02 +00:00
QA: System property to override distribution (#30591)
This configures all `qa` projects to use the distribution contained in the `tests.distribution` system property if it is set. The goal is to create a simple way to run tests against the default distribution which has x-pack basic features enabled while not forcing these tests on all contributors. You run these tests by doing something like: ``` ./gradlew -p qa -Dtests.distribution=zip check ``` or ``` ./gradlew -p qa -Dtests.distribution=zip bwcTest ``` x-pack basic *shouldn't* get in the way of any of these tests but nothing is ever perfect so this we have to disable a few when running with the zip distribution.
This commit is contained in:
parent
2cb71d0947
commit
869b639d14
@ -4,7 +4,7 @@ import org.elasticsearch.gradle.test.RestIntegTestTask
|
||||
subprojects { Project subproj ->
|
||||
subproj.tasks.withType(RestIntegTestTask) {
|
||||
subproj.extensions.configure("${it.name}Cluster") { cluster ->
|
||||
cluster.distribution = 'oss-zip'
|
||||
cluster.distribution = System.getProperty('tests.distribution', 'oss-zip')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -54,9 +54,16 @@ for (Version version : bwcVersions.wireCompatible) {
|
||||
bwcTest.dependsOn(versionBwcTest)
|
||||
}
|
||||
|
||||
/* To support taking index snapshots, we have to set path.repo setting */
|
||||
tasks.getByName("${baseName}#mixedClusterTestRunner").configure {
|
||||
/* To support taking index snapshots, we have to set path.repo setting */
|
||||
systemProperty 'tests.path.repo', new File(buildDir, "cluster/shared/repo")
|
||||
if ('zip'.equals(extension.distribution)) {
|
||||
systemProperty 'tests.rest.blacklist', [
|
||||
'cat.templates/10_basic/No templates',
|
||||
'cat.templates/10_basic/Sort templates',
|
||||
'cat.templates/10_basic/Multiple template',
|
||||
].join(',')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -27,3 +27,13 @@ integTest {
|
||||
integTestCluster {
|
||||
numNodes = 2
|
||||
}
|
||||
|
||||
integTestRunner {
|
||||
if ('zip'.equals(integTestCluster.distribution)) {
|
||||
systemProperty 'tests.rest.blacklist', [
|
||||
'cat.templates/10_basic/No templates',
|
||||
'cat.templates/10_basic/Sort templates',
|
||||
'cat.templates/10_basic/Multiple template',
|
||||
].join(',')
|
||||
}
|
||||
}
|
||||
|
@ -26,3 +26,11 @@ dependencies {
|
||||
testCompile project(path: ':modules:lang-mustache', configuration: 'runtime')
|
||||
}
|
||||
|
||||
/*
|
||||
* One of the integration tests doesn't work with the zip distribution
|
||||
* and will be fixed later.
|
||||
* Tracked by https://github.com/elastic/elasticsearch/issues/30628
|
||||
*/
|
||||
if ("zip".equals(integTestCluster.distribution)) {
|
||||
integTestRunner.enabled = false
|
||||
}
|
||||
|
@ -149,6 +149,7 @@ public class ReproduceInfoPrinter extends RunListener {
|
||||
}
|
||||
appendOpt("tests.locale", Locale.getDefault().toLanguageTag());
|
||||
appendOpt("tests.timezone", TimeZone.getDefault().getID());
|
||||
appendOpt("tests.distribution", System.getProperty("tests.distribution"));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user