mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-27 17:10:22 -04:00
Do not create unused testCluster (#77581)
* Do not create unused testCluster This avoids creating test clusters that are not required during the build. We use lazy configuration here on testClusters and only instantiate them as theyre * Do not fail on run task (debug) * Create more test cluster lazy * Make more test cluster lazy * Avoid creating unused testcluster * Fix PluginBuildPlugin * Fix disabling geo db download * Fix cluster setup in repository-multi-version * Polishing * Fix issue with irretic groovy ogic * Fix bwc tests * Fix more bwcTests * Fix more bwc tests * Fix more bwc tests * Fix more bwc tests * Fix typo * Minor polishing * Fix rolling upgrade tests * Fix cluster config in sql qa mixedcluster project * Fix more bwc tests * Clean up before review * Document test cluster usage * Api polising after Review provide useCluster(Provider) method to TestClusterAware Ideally we take this a step further and realize those test clusters only on use. But out of scope of this PR. * Allow gradle provider as value for nonSystemProperties * Some simplification on test configuration * Fix typo in rest test config * Fix more typos * Fix another typo * Fix more typos
This commit is contained in:
parent
9de62d53a2
commit
6ef13abe81
111 changed files with 544 additions and 560 deletions
17
BUILDING.md
17
BUILDING.md
|
@ -78,6 +78,23 @@ The major difference between these two syntaxes is, that the configuration block
|
|||
|
||||
By actually doing less in the gradle configuration time as only creating tasks that are requested as part of the build and by only running the configurations for those requested tasks, using the task avoidance api contributes a major part in keeping our build fast.
|
||||
|
||||
#### Registering test clusters
|
||||
|
||||
When using the elasticsearch test cluster plugin we want to use (similar to the task avoidance API) a Gradle API to create domain objects lazy or only if required by the build.
|
||||
Therefore we register test cluster by using the following syntax:
|
||||
|
||||
def someClusterProvider = testClusters.register('someCluster') { ... }
|
||||
|
||||
This registers a potential testCluster named `somecluster` and provides a provider instance, but doesn't create it yet nor configures it. This makes the gradle configuration phase more efficient by
|
||||
doing less.
|
||||
|
||||
To wire this registered cluster into a `TestClusterAware` task (e.g. `RestIntegTest`) you can resolve the actual cluster from the provider instance:
|
||||
|
||||
tasks.register('someClusterTest', RestIntegTestTask) {
|
||||
useCluster someClusterProvider
|
||||
nonInputProperties.systemProperty 'tests.leader_host', "${-> someClusterProvider.get().getAllHttpSocketURI().get(0)}"
|
||||
}
|
||||
|
||||
#### Adding additional integration tests
|
||||
|
||||
Additional integration tests for a certain elasticsearch modules that are specific to certain cluster configuration can be declared in a separate so called `qa` subproject of your module.
|
||||
|
|
|
@ -13,8 +13,7 @@ import org.elasticsearch.gradle.testclusters.RunTask
|
|||
// precompiled script plugins (see https://github.com/gradle/gradle/issues/17004)
|
||||
// apply plugin: 'elasticsearch.internal-testclusters'
|
||||
|
||||
testClusters {
|
||||
runTask {
|
||||
testClusters.register("runTask") {
|
||||
testDistribution = providers.systemProperty('run.distribution').orElse('default').forUseAtConfigurationTime().get()
|
||||
if (providers.systemProperty('run.distribution').orElse('default').forUseAtConfigurationTime().get() == 'default') {
|
||||
String licenseType = providers.systemProperty("run.license_type").orElse("basic").forUseAtConfigurationTime().get()
|
||||
|
@ -30,11 +29,10 @@ testClusters {
|
|||
keystore 'bootstrap.password', 'password'
|
||||
user username: 'elastic-admin', password: 'elastic-password', role: 'superuser'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register("run", RunTask) {
|
||||
useCluster testClusters.runTask;
|
||||
useCluster testClusters.named("runTask")
|
||||
description = 'Runs elasticsearch in the foreground'
|
||||
group = 'Verification'
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ public class PluginBuildPlugin implements Plugin<Project> {
|
|||
// Auto add dependent modules to the test cluster
|
||||
if (project1.findProject(":modules:" + pluginName) != null) {
|
||||
NamedDomainObjectContainer<ElasticsearchCluster> testClusters = testClusters(project, "testClusters");
|
||||
testClusters.all(elasticsearchCluster -> elasticsearchCluster.module(":modules:" + pluginName));
|
||||
testClusters.configureEach(elasticsearchCluster -> elasticsearchCluster.module(":modules:" + pluginName));
|
||||
}
|
||||
});
|
||||
final var extension1 = project1.getExtensions().getByType(PluginPropertiesExtension.class);
|
||||
|
@ -120,17 +120,17 @@ public class PluginBuildPlugin implements Plugin<Project> {
|
|||
|
||||
// allow running ES with this plugin in the foreground of a build
|
||||
var testClusters = testClusters(project, TestClustersPlugin.EXTENSION_NAME);
|
||||
final var runCluster = testClusters.create("runTask", cluster -> {
|
||||
var runCluster = testClusters.register("runtTask", c -> {
|
||||
if (GradleUtils.isModuleProject(project.getPath())) {
|
||||
cluster.module(bundleTask.flatMap((Transformer<Provider<RegularFile>, Zip>) zip -> zip.getArchiveFile()));
|
||||
c.module(bundleTask.flatMap((Transformer<Provider<RegularFile>, Zip>) zip -> zip.getArchiveFile()));
|
||||
} else {
|
||||
cluster.plugin(bundleTask.flatMap((Transformer<Provider<RegularFile>, Zip>) zip -> zip.getArchiveFile()));
|
||||
c.plugin(bundleTask.flatMap((Transformer<Provider<RegularFile>, Zip>) zip -> zip.getArchiveFile()));
|
||||
}
|
||||
});
|
||||
|
||||
project.getTasks().register("run", RunTask.class, runTask -> {
|
||||
runTask.useCluster(runCluster);
|
||||
runTask.dependsOn(project.getTasks().named(BUNDLE_PLUGIN_TASK_NAME));
|
||||
project.getTasks().register("run", RunTask.class, r -> {
|
||||
r.useCluster(runCluster.get());
|
||||
r.dependsOn(project.getTasks().named(BUNDLE_PLUGIN_TASK_NAME));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -48,15 +48,16 @@ public class JavaRestTestPlugin implements Plugin<Project> {
|
|||
NamedDomainObjectContainer<ElasticsearchCluster> testClusters = (NamedDomainObjectContainer<ElasticsearchCluster>) project
|
||||
.getExtensions()
|
||||
.getByName(TestClustersPlugin.EXTENSION_NAME);
|
||||
var cluster = testClusters.maybeCreate(JAVA_REST_TEST);
|
||||
var clusterProvider = testClusters.register(JAVA_REST_TEST);
|
||||
|
||||
// Register test task
|
||||
TaskProvider<StandaloneRestIntegTestTask> javaRestTestTask = project.getTasks()
|
||||
.register(JAVA_REST_TEST, StandaloneRestIntegTestTask.class, task -> {
|
||||
task.useCluster(cluster);
|
||||
task.useCluster(clusterProvider);
|
||||
task.setTestClassesDirs(testSourceSet.getOutput().getClassesDirs());
|
||||
task.setClasspath(testSourceSet.getRuntimeClasspath());
|
||||
|
||||
var cluster = clusterProvider.get();
|
||||
var nonInputProperties = new SystemPropertyCommandLineArgumentProvider();
|
||||
nonInputProperties.systemProperty("tests.rest.cluster", () -> String.join(",", cluster.getAllHttpSocketURI()));
|
||||
nonInputProperties.systemProperty("tests.cluster", () -> String.join(",", cluster.getAllTransportPortURI()));
|
||||
|
@ -67,7 +68,7 @@ public class JavaRestTestPlugin implements Plugin<Project> {
|
|||
// Register plugin bundle with test cluster
|
||||
project.getPlugins().withType(PluginBuildPlugin.class, p -> {
|
||||
TaskProvider<Zip> bundle = project.getTasks().withType(Zip.class).named(BUNDLE_PLUGIN_TASK_NAME);
|
||||
cluster.plugin(bundle.flatMap(Zip::getArchiveFile));
|
||||
clusterProvider.configure( c-> c.plugin(bundle.flatMap(Zip::getArchiveFile)));
|
||||
javaRestTestTask.configure(t -> t.dependsOn(bundle));
|
||||
});
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
*/
|
||||
package org.elasticsearch.gradle.test;
|
||||
|
||||
import org.gradle.api.provider.Provider;
|
||||
import org.gradle.api.tasks.Input;
|
||||
import org.gradle.process.CommandLineArgumentProvider;
|
||||
|
||||
|
@ -18,6 +19,10 @@ import java.util.stream.Collectors;
|
|||
public class SystemPropertyCommandLineArgumentProvider implements CommandLineArgumentProvider {
|
||||
private final Map<String, Object> systemProperties = new LinkedHashMap<>();
|
||||
|
||||
public void systemProperty(String key, Provider<Object> value) {
|
||||
systemProperties.put(key, (Supplier<String>) () -> String.valueOf(value.get()));
|
||||
}
|
||||
|
||||
public void systemProperty(String key, Supplier<String> value) {
|
||||
systemProperties.put(key, value);
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ import org.elasticsearch.gradle.testclusters.TestClustersPlugin;
|
|||
import org.elasticsearch.gradle.transform.UnzipTransform;
|
||||
import org.gradle.api.Action;
|
||||
import org.gradle.api.NamedDomainObjectContainer;
|
||||
import org.gradle.api.NamedDomainObjectProvider;
|
||||
import org.gradle.api.Plugin;
|
||||
import org.gradle.api.Project;
|
||||
import org.gradle.api.Task;
|
||||
|
@ -81,11 +82,11 @@ public class YamlRestTestPlugin implements Plugin<Project> {
|
|||
testSourceSet.getOutput().dir(copyRestTestSpecs.map(Task::getOutputs));
|
||||
Configuration yamlRestTestImplementation = configurations.getByName(testSourceSet.getImplementationConfigurationName());
|
||||
setupDefaultDependencies(project.getDependencies(), restTestSpecs, yamlRestTestImplementation);
|
||||
var cluster = testClusters.maybeCreate(YAML_REST_TEST);
|
||||
var cluster = testClusters.register(YAML_REST_TEST);
|
||||
TaskProvider<StandaloneRestIntegTestTask> yamlRestTestTask = setupTestTask(project, testSourceSet, cluster);
|
||||
project.getPlugins().withType(PluginBuildPlugin.class, p -> {
|
||||
TaskProvider<Zip> bundle = project.getTasks().withType(Zip.class).named(BUNDLE_PLUGIN_TASK_NAME);
|
||||
cluster.plugin(bundle.flatMap(Zip::getArchiveFile));
|
||||
cluster.configure(c -> c.plugin(bundle.flatMap(Zip::getArchiveFile)));
|
||||
yamlRestTestTask.configure(t -> t.dependsOn(bundle));
|
||||
});
|
||||
|
||||
|
@ -109,15 +110,16 @@ public class YamlRestTestPlugin implements Plugin<Project> {
|
|||
}
|
||||
|
||||
private TaskProvider<StandaloneRestIntegTestTask> setupTestTask(
|
||||
Project project,
|
||||
SourceSet testSourceSet,
|
||||
ElasticsearchCluster cluster
|
||||
Project project,
|
||||
SourceSet testSourceSet,
|
||||
NamedDomainObjectProvider<ElasticsearchCluster> clusterProvider
|
||||
) {
|
||||
return project.getTasks().register(YAML_REST_TEST, StandaloneRestIntegTestTask.class, task -> {
|
||||
task.useCluster(cluster);
|
||||
task.useCluster(clusterProvider.get());
|
||||
task.setTestClassesDirs(testSourceSet.getOutput().getClassesDirs());
|
||||
task.setClasspath(testSourceSet.getRuntimeClasspath());
|
||||
|
||||
var cluster = clusterProvider.get();
|
||||
var nonInputProperties = new SystemPropertyCommandLineArgumentProvider();
|
||||
nonInputProperties.systemProperty("tests.rest.cluster", () -> String.join(",", cluster.getAllHttpSocketURI()));
|
||||
nonInputProperties.systemProperty("tests.cluster", () -> String.join(",", cluster.getAllTransportPortURI()));
|
||||
|
|
|
@ -10,6 +10,7 @@ package org.elasticsearch.gradle.testclusters;
|
|||
import org.gradle.api.Action;
|
||||
import org.gradle.api.Task;
|
||||
import org.gradle.api.artifacts.Configuration;
|
||||
import org.gradle.api.provider.Provider;
|
||||
import org.gradle.api.tasks.Nested;
|
||||
|
||||
import java.util.Collection;
|
||||
|
@ -31,5 +32,9 @@ public interface TestClustersAware extends Task {
|
|||
getClusters().add(cluster);
|
||||
}
|
||||
|
||||
default void useCluster(Provider<ElasticsearchCluster> cluster) {
|
||||
useCluster(cluster.get());
|
||||
}
|
||||
|
||||
default void beforeStart() {}
|
||||
}
|
||||
|
|
|
@ -121,7 +121,7 @@ public class TestClustersPlugin implements Plugin<Project> {
|
|||
);
|
||||
});
|
||||
project.getExtensions().add(EXTENSION_NAME, container);
|
||||
container.all(cluster -> cluster.systemProperty("ingest.geoip.downloader.enabled.default", "false"));
|
||||
container.configureEach(cluster -> cluster.systemProperty("ingest.geoip.downloader.enabled.default", "false"));
|
||||
return container;
|
||||
}
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ tasks.named("check").configure {
|
|||
dependsOn(asyncIntegTest)
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
systemProperty 'es.scripting.update.ctx_in_params', 'false'
|
||||
setting 'reindex.remote.whitelist', '[ "[::1]:*", "127.0.0.1:*" ]'
|
||||
|
|
|
@ -44,8 +44,7 @@ tasks.named("integTest").configure {
|
|||
* when running against an external cluster.
|
||||
*/
|
||||
if (project.providers.systemProperty("tests.rest.cluster").forUseAtConfigurationTime().isPresent()) {
|
||||
nonInputProperties.systemProperty 'tests.logfile',
|
||||
"${-> testClusters.integTest.singleNode().getServerLog()}"
|
||||
nonInputProperties.systemProperty 'tests.logfile', testClusters.named('integTest').map(c -> c.singleNode().serverLog)
|
||||
} else {
|
||||
systemProperty 'tests.logfile', '--external--'
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ restResources {
|
|||
}
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
// Needed in order to test ingest pipeline templating:
|
||||
// (this is because the integTest node is not using default distribution, but only the minimal number of required modules)
|
||||
module ':modules:lang-mustache'
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
apply plugin: 'elasticsearch.standalone-rest-test'
|
||||
apply plugin: 'elasticsearch.rest-test'
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'resource.reload.interval.high', '100ms'
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
|
@ -18,7 +18,7 @@ testClusters.all {
|
|||
|
||||
tasks.named("integTest").configure {
|
||||
systemProperty 'tests.security.manager', 'false' // Allows the test the add databases to config directory.
|
||||
nonInputProperties.systemProperty 'tests.config.dir', "${-> testClusters.integTest.singleNode().getConfigDir()}"
|
||||
nonInputProperties.systemProperty 'tests.config.dir', testClusters.named("integTest").map(c -> c.singleNode().getConfigDir())
|
||||
}
|
||||
|
||||
tasks.named("forbiddenPatterns").configure {
|
||||
|
|
|
@ -19,7 +19,7 @@ restResources {
|
|||
}
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
extraConfigFile 'ingest-user-agent/test-regexes.yml', file('src/test/test-regexes.yml')
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ dependencies {
|
|||
api project(path: ':modules:reindex')
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
module ':modules:reindex'
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ esplugin {
|
|||
classname 'org.elasticsearch.painless.PainlessPlugin'
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
module ':modules:mapper-extras'
|
||||
systemProperty 'es.scripting.update.ctx_in_params', 'false'
|
||||
// TODO: remove this once cname is prepended to transport.publish_address by default in 8.0
|
||||
|
@ -109,41 +109,37 @@ dependencies {
|
|||
}
|
||||
}
|
||||
|
||||
testClusters {
|
||||
generateContextCluster {
|
||||
testDistribution = 'DEFAULT'
|
||||
}
|
||||
def generateContextCluster = testClusters.register("generateContextCluster") {
|
||||
testDistribution = 'DEFAULT'
|
||||
}
|
||||
|
||||
tasks.register("generateContextDoc", DefaultTestClustersTask) {
|
||||
dependsOn sourceSets.doc.runtimeClasspath
|
||||
useCluster testClusters.generateContextCluster
|
||||
useCluster generateContextCluster
|
||||
doFirst {
|
||||
project.javaexec {
|
||||
mainClass = 'org.elasticsearch.painless.ContextDocGenerator'
|
||||
classpath = sourceSets.doc.runtimeClasspath
|
||||
systemProperty "cluster.uri", "${-> testClusters.generateContextCluster.singleNode().getAllHttpSocketURI().get(0)}"
|
||||
systemProperty "cluster.uri", "${-> generateContextCluster.get().singleNode().getAllHttpSocketURI().get(0)}"
|
||||
}.assertNormalExitValue()
|
||||
}
|
||||
}
|
||||
/**********************************************
|
||||
* Context JSON Generation *
|
||||
**********************************************/
|
||||
testClusters {
|
||||
generateContextApiSpecCluster {
|
||||
def generateContextApiSpecCluster = testClusters.register("generateContextApiSpecCluster") {
|
||||
testDistribution = 'DEFAULT'
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register("generateContextApiSpec", DefaultTestClustersTask) {
|
||||
dependsOn sourceSets.doc.runtimeClasspath
|
||||
useCluster testClusters.generateContextApiSpecCluster
|
||||
useCluster generateContextApiSpecCluster
|
||||
doFirst {
|
||||
project.javaexec {
|
||||
mainClass = 'org.elasticsearch.painless.ContextApiSpecGenerator'
|
||||
classpath = sourceSets.doc.runtimeClasspath
|
||||
systemProperty "cluster.uri", "${-> testClusters.generateContextApiSpecCluster.singleNode().getAllHttpSocketURI().get(0)}"
|
||||
systemProperty "jdksrc", providers.systemProperty("jdksrc").forUseAtConfigurationTime().getOrNull()
|
||||
systemProperty "cluster.uri", "${-> generateContextApiSpecCluster.get().singleNode().getAllHttpSocketURI().get(0)}"
|
||||
systemProperty "jdksrc", providers.systemProperty("jdksrc").getOrNull()
|
||||
systemProperty "packageSources", providers.systemProperty("packageSources").forUseAtConfigurationTime().getOrNull()
|
||||
}.assertNormalExitValue()
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ restResources {
|
|||
}
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
// Modules who's integration is explicitly tested in integration tests
|
||||
module ':modules:lang-mustache'
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ esplugin {
|
|||
classname 'org.elasticsearch.reindex.ReindexPlugin'
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
// Modules who's integration is explicitly tested in integration tests
|
||||
module ':modules:parent-join'
|
||||
module ':modules:lang-painless'
|
||||
|
@ -151,7 +151,7 @@ if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
|||
/* Use a closure on the string to delay evaluation until right before we
|
||||
* run the integration tests so that we can be sure that the file is
|
||||
* ready. */
|
||||
nonInputProperties.systemProperty "es${version}.port", "${-> fixture.get().addressAndPort}"
|
||||
nonInputProperties.systemProperty "es${version}.port", fixture.map(f->f.addressAndPort)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ def fixtureAddress = { fixtureName ->
|
|||
|
||||
File repositoryDir = fixture.fsRepositoryDir as File
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
// repositoryDir is used by a FS repository to create snapshots
|
||||
setting 'path.repo', "${repositoryDir.absolutePath}", PropertyNormalization.IGNORE_VALUE
|
||||
// repositoryDir is used by two URL repositories to restore snapshots
|
||||
|
|
|
@ -16,7 +16,7 @@ esplugin {
|
|||
noticeFile rootProject.file('NOTICE.txt')
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
// Adds a setting in the Elasticsearch keystore before running the integration tests
|
||||
keystore 'custom.secured', 'password'
|
||||
}
|
||||
|
|
|
@ -16,6 +16,6 @@ esplugin {
|
|||
noticeFile rootProject.file('NOTICE.txt')
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
numberOfNodes = 2
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ dependencies {
|
|||
compileOnly "org.elasticsearch.plugin:elasticsearch-scripting-painless-spi:${elasticsearchVersion}"
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ import org.elasticsearch.gradle.testclusters.TestClustersPlugin
|
|||
|
||||
subprojects { Project subproj ->
|
||||
plugins.withType(TestClustersPlugin).whenPluginAdded {
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,8 +20,8 @@ dependencies {
|
|||
}
|
||||
|
||||
for (Version bwcVersion : BuildParams.bwcVersions.wireCompatible) {
|
||||
String baseName = "v${bwcVersion}"
|
||||
String bwcVersionStr = "${bwcVersion}"
|
||||
String bwcVersionStr = bwcVersion.toString()
|
||||
String baseName = "v" + bwcVersionStr
|
||||
|
||||
/**
|
||||
* We execute tests 3 times.
|
||||
|
@ -30,30 +30,29 @@ for (Version bwcVersion : BuildParams.bwcVersions.wireCompatible) {
|
|||
* - Only node-0 and node-2 of the remote cluster can accept remote connections. This can creates a test
|
||||
* scenario where a query request and fetch request are sent via **proxy nodes** that have different version.
|
||||
*/
|
||||
testClusters {
|
||||
"${baseName}-local" {
|
||||
numberOfNodes = 2
|
||||
versions = [bwcVersionStr, project.version]
|
||||
setting 'cluster.remote.node.attr', 'gateway'
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
}
|
||||
"${baseName}-remote" {
|
||||
numberOfNodes = 3
|
||||
versions = [bwcVersionStr, project.version]
|
||||
firstNode.setting 'node.attr.gateway', 'true'
|
||||
lastNode.setting 'node.attr.gateway', 'true'
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
}
|
||||
def localCluster = testClusters.register("${baseName}-local") {
|
||||
numberOfNodes = 2
|
||||
versions = [bwcVersionStr, project.version]
|
||||
setting 'cluster.remote.node.attr', 'gateway'
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
}
|
||||
def remoteCluster = testClusters.register("${baseName}-remote") {
|
||||
numberOfNodes = 3
|
||||
versions = [bwcVersionStr, project.version]
|
||||
firstNode.setting 'node.attr.gateway', 'true'
|
||||
lastNode.setting 'node.attr.gateway', 'true'
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
}
|
||||
|
||||
|
||||
tasks.withType(StandaloneRestIntegTestTask).matching { it.name.startsWith("${baseName}#") }.configureEach {
|
||||
useCluster testClusters."${baseName}-local"
|
||||
useCluster testClusters."${baseName}-remote"
|
||||
useCluster localCluster
|
||||
useCluster remoteCluster
|
||||
systemProperty 'tests.upgrade_from_version', bwcVersionStr.replace('-SNAPSHOT', '')
|
||||
|
||||
doFirst {
|
||||
nonInputProperties.systemProperty('tests.rest.cluster', "${-> testClusters."${baseName}-local".allHttpSocketURI.join(",")}")
|
||||
nonInputProperties.systemProperty('tests.rest.remote_cluster', "${-> testClusters."${baseName}-remote".allHttpSocketURI.join(",")}")
|
||||
nonInputProperties.systemProperty('tests.rest.cluster', localCluster.map(c -> c.allHttpSocketURI.join(",")))
|
||||
nonInputProperties.systemProperty('tests.rest.remote_cluster', remoteCluster.map(c -> c.allHttpSocketURI.join(",")))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -61,22 +60,22 @@ for (Version bwcVersion : BuildParams.bwcVersions.wireCompatible) {
|
|||
dependsOn "processTestResources"
|
||||
mustRunAfter("precommit")
|
||||
doFirst {
|
||||
testClusters."${baseName}-local".nextNodeToNextVersion()
|
||||
testClusters."${baseName}-remote".nextNodeToNextVersion()
|
||||
localCluster.get().nextNodeToNextVersion()
|
||||
remoteCluster.get().nextNodeToNextVersion()
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register("${baseName}#twoThirdUpgraded", StandaloneRestIntegTestTask) {
|
||||
dependsOn "${baseName}#oneThirdUpgraded"
|
||||
doFirst {
|
||||
testClusters."${baseName}-remote".nextNodeToNextVersion()
|
||||
remoteCluster.get().nextNodeToNextVersion()
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register("${baseName}#fullUpgraded", StandaloneRestIntegTestTask) {
|
||||
dependsOn "${baseName}#twoThirdUpgraded"
|
||||
doFirst {
|
||||
testClusters."${baseName}-remote".nextNodeToNextVersion()
|
||||
remoteCluster.get().nextNodeToNextVersion()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,21 +17,20 @@ apply plugin: 'elasticsearch.internal-test-artifact'
|
|||
apply plugin: 'elasticsearch.bwc-test'
|
||||
|
||||
for (Version bwcVersion : BuildParams.bwcVersions.indexCompatible) {
|
||||
String baseName = "v${bwcVersion}"
|
||||
def bwcVersionString = bwcVersion.toString();
|
||||
String baseName = "v" + bwcVersionString
|
||||
|
||||
testClusters {
|
||||
"${baseName}" {
|
||||
versions = [bwcVersion.toString(), project.version]
|
||||
def baseCluster = testClusters.register(baseName) {
|
||||
versions = [bwcVersionString, project.version]
|
||||
numberOfNodes = 2
|
||||
// some tests rely on the translog not being flushed
|
||||
setting 'indices.memory.shard_inactive_time', '60m'
|
||||
setting 'path.repo', "${buildDir}/cluster/shared/repo/${baseName}"
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register("${baseName}#oldClusterTest", StandaloneRestIntegTestTask) {
|
||||
useCluster testClusters."${baseName}"
|
||||
useCluster baseCluster
|
||||
mustRunAfter("precommit")
|
||||
doFirst {
|
||||
delete("${buildDir}/cluster/shared/repo/${baseName}")
|
||||
|
@ -41,20 +40,20 @@ for (Version bwcVersion : BuildParams.bwcVersions.indexCompatible) {
|
|||
}
|
||||
|
||||
tasks.register("${baseName}#upgradedClusterTest", StandaloneRestIntegTestTask) {
|
||||
useCluster testClusters."${baseName}"
|
||||
useCluster baseCluster
|
||||
dependsOn "${baseName}#oldClusterTest"
|
||||
doFirst {
|
||||
testClusters."${baseName}".goToNextVersion()
|
||||
baseCluster.get().goToNextVersion()
|
||||
}
|
||||
systemProperty 'tests.is_old_cluster', 'false'
|
||||
}
|
||||
|
||||
String oldVersion = bwcVersion.toString().minus("-SNAPSHOT")
|
||||
String oldVersion = bwcVersionString.minus("-SNAPSHOT")
|
||||
tasks.matching { it.name.startsWith(baseName) && it.name.endsWith("ClusterTest") }.configureEach {
|
||||
it.systemProperty 'tests.old_cluster_version', oldVersion
|
||||
it.systemProperty 'tests.path.repo', "${buildDir}/cluster/shared/repo/${baseName}"
|
||||
it.nonInputProperties.systemProperty('tests.rest.cluster', "${-> testClusters."${baseName}".allHttpSocketURI.join(",")}")
|
||||
it.nonInputProperties.systemProperty('tests.clustername', "${-> testClusters."${baseName}".getName()}")
|
||||
it.nonInputProperties.systemProperty('tests.rest.cluster', baseCluster.map(c -> c.allHttpSocketURI.join(",")))
|
||||
it.nonInputProperties.systemProperty('tests.clustername', baseName)
|
||||
}
|
||||
|
||||
tasks.register(bwcTaskName(bwcVersion)) {
|
||||
|
|
|
@ -28,42 +28,39 @@ for (Version bwcVersion : BuildParams.bwcVersions.wireCompatible) {
|
|||
continue;
|
||||
}
|
||||
|
||||
String baseName = "v${bwcVersion}"
|
||||
String bwcVersionString = bwcVersion.toString()
|
||||
String baseName = "v" + bwcVersionString
|
||||
|
||||
/* This project runs the core REST tests against a 4 node cluster where two of
|
||||
the nodes has a different minor. */
|
||||
testClusters {
|
||||
"${baseName}" {
|
||||
versions = [bwcVersion.toString(), project.version]
|
||||
numberOfNodes = 4
|
||||
|
||||
setting 'path.repo', "${buildDir}/cluster/shared/repo/${baseName}"
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
}
|
||||
def baseCluster = testClusters.register(baseName) {
|
||||
versions = [bwcVersionString, project.version]
|
||||
numberOfNodes = 4
|
||||
setting 'path.repo', "${buildDir}/cluster/shared/repo/${baseName}"
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
}
|
||||
|
||||
tasks.register("${baseName}#mixedClusterTest", StandaloneRestIntegTestTask) {
|
||||
useCluster testClusters."${baseName}"
|
||||
useCluster baseCluster
|
||||
mustRunAfter("precommit")
|
||||
doFirst {
|
||||
delete("${buildDir}/cluster/shared/repo/${baseName}")
|
||||
// Getting the endpoints causes a wait for the cluster
|
||||
println "Test cluster endpoints are: ${-> testClusters."${baseName}".allHttpSocketURI.join(",")}"
|
||||
println "Test cluster endpoints are: ${-> baseCluster.get().allHttpSocketURI.join(",")}"
|
||||
println "Upgrading one node to create a mixed cluster"
|
||||
if (BuildParams.isSnapshotBuild() == false) {
|
||||
testClusters."${baseName}".nodes."${baseName}-0".systemProperty 'es.index_mode_feature_flag_registered', 'true'
|
||||
baseCluster.get().nodes."${baseName}-0".systemProperty 'es.index_mode_feature_flag_registered', 'true'
|
||||
}
|
||||
testClusters."${baseName}".nextNodeToNextVersion()
|
||||
baseCluster.get().nextNodeToNextVersion()
|
||||
// Getting the endpoints causes a wait for the cluster
|
||||
println "Upgrade complete, endpoints are: ${-> testClusters."${baseName}".allHttpSocketURI.join(",")}"
|
||||
println "Upgrade complete, endpoints are: ${-> baseCluster.get().allHttpSocketURI.join(",")}"
|
||||
println "Upgrading another node to create a mixed cluster"
|
||||
if (BuildParams.isSnapshotBuild() == false) {
|
||||
testClusters."${baseName}".nodes."${baseName}-1".systemProperty 'es.index_mode_feature_flag_registered', 'true'
|
||||
baseCluster.get().nodes."${baseName}-1".systemProperty 'es.index_mode_feature_flag_registered', 'true'
|
||||
}
|
||||
testClusters."${baseName}".nextNodeToNextVersion()
|
||||
|
||||
nonInputProperties.systemProperty('tests.rest.cluster', "${-> testClusters."${baseName}".allHttpSocketURI.join(",")}")
|
||||
nonInputProperties.systemProperty('tests.clustername', "${-> testClusters."${baseName}".getName()}")
|
||||
baseCluster.get().nextNodeToNextVersion()
|
||||
nonInputProperties.systemProperty('tests.rest.cluster', baseCluster.map(c -> c.allHttpSocketURI.join(",")))
|
||||
nonInputProperties.systemProperty('tests.clustername', baseName)
|
||||
}
|
||||
systemProperty 'tests.path.repo', "${buildDir}/cluster/shared/repo/${baseName}"
|
||||
onlyIf { project.bwc_tests_enabled }
|
||||
|
|
|
@ -21,16 +21,14 @@ tasks.register('remote-cluster', RestIntegTestTask) {
|
|||
systemProperty 'tests.rest.suite', 'remote_cluster'
|
||||
}
|
||||
|
||||
testClusters {
|
||||
'remote-cluster' {
|
||||
numberOfNodes = 2
|
||||
setting 'node.roles', '[data,ingest,master]'
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
}
|
||||
testClusters.matching{ it.name == 'remote-cluster' }.configureEach {
|
||||
numberOfNodes = 2
|
||||
setting 'node.roles', '[data,ingest,master]'
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
}
|
||||
|
||||
tasks.register("mixedClusterTest", RestIntegTestTask) {
|
||||
useCluster testClusters.'remote-cluster'
|
||||
useCluster testClusters.named('remote-cluster')
|
||||
dependsOn 'remote-cluster'
|
||||
systemProperty 'tests.rest.suite', 'multi_cluster'
|
||||
}
|
||||
|
|
|
@ -34,13 +34,11 @@ for (Version bwcVersion : BuildParams.bwcVersions.indexCompatible) {
|
|||
}
|
||||
}
|
||||
|
||||
testClusters {
|
||||
"${oldClusterName}" clusterSettings(bwcVersion.toString())
|
||||
"${newClusterName}" clusterSettings(project.version)
|
||||
}
|
||||
testClusters.register(oldClusterName, clusterSettings(bwcVersion.toString()))
|
||||
testClusters.register(newClusterName, clusterSettings(project.version))
|
||||
|
||||
tasks.register("${baseName}#Step1OldClusterTest", StandaloneRestIntegTestTask) {
|
||||
useCluster testClusters."${oldClusterName}"
|
||||
useCluster testClusters.named(oldClusterName)
|
||||
mustRunAfter("precommit")
|
||||
doFirst {
|
||||
delete("${buildDir}/cluster/shared/repo/${baseName}")
|
||||
|
@ -49,19 +47,19 @@ for (Version bwcVersion : BuildParams.bwcVersions.indexCompatible) {
|
|||
}
|
||||
|
||||
tasks.register("${baseName}#Step2NewClusterTest", StandaloneRestIntegTestTask) {
|
||||
useCluster testClusters."${newClusterName}"
|
||||
useCluster testClusters.named(newClusterName)
|
||||
dependsOn "${baseName}#Step1OldClusterTest"
|
||||
systemProperty 'tests.rest.suite', 'step2'
|
||||
}
|
||||
|
||||
tasks.register("${baseName}#Step3OldClusterTest", StandaloneRestIntegTestTask) {
|
||||
useCluster testClusters."${oldClusterName}"
|
||||
useCluster testClusters.named(oldClusterName)
|
||||
dependsOn "${baseName}#Step2NewClusterTest"
|
||||
systemProperty 'tests.rest.suite', 'step3'
|
||||
}
|
||||
|
||||
tasks.register("${baseName}#Step4NewClusterTest", StandaloneRestIntegTestTask) {
|
||||
useCluster testClusters."${newClusterName}"
|
||||
useCluster testClusters.named(newClusterName)
|
||||
dependsOn "${baseName}#Step3OldClusterTest"
|
||||
systemProperty 'tests.rest.suite', 'step4'
|
||||
}
|
||||
|
@ -70,8 +68,8 @@ for (Version bwcVersion : BuildParams.bwcVersions.indexCompatible) {
|
|||
it.systemProperty 'tests.old_cluster_version', bwcVersion.toString().minus("-SNAPSHOT")
|
||||
it.systemProperty 'tests.path.repo', "${buildDir}/cluster/shared/repo/${baseName}"
|
||||
def clusterName = it.name.contains("Step2") || it.name.contains("Step4") ? "${newClusterName}" : "${oldClusterName}"
|
||||
it.nonInputProperties.systemProperty('tests.rest.cluster', "${-> testClusters."${clusterName}".allHttpSocketURI.join(",")}")
|
||||
it.nonInputProperties.systemProperty('tests.clustername', "${-> testClusters."${clusterName}".getName()}")
|
||||
it.nonInputProperties.systemProperty('tests.rest.cluster', testClusters.named(clusterName).map(c -> c.allHttpSocketURI.join(",")))
|
||||
it.nonInputProperties.systemProperty('tests.clustername', clusterName)
|
||||
}
|
||||
|
||||
tasks.register(bwcTaskName(bwcVersion)) {
|
||||
|
|
|
@ -29,70 +29,70 @@ for (Version bwcVersion : BuildParams.bwcVersions.wireCompatible) {
|
|||
* <li>run tests with systemProperty 'tests.rest.suite', 'upgraded_cluster'
|
||||
* </ul>
|
||||
*/
|
||||
String baseName = "v${bwcVersion}"
|
||||
|
||||
testClusters {
|
||||
"${baseName}" {
|
||||
versions = [bwcVersion.toString(), project.version]
|
||||
numberOfNodes = 3
|
||||
String bwcVersionString = bwcVersion.toString()
|
||||
String baseName = "v" + bwcVersionString
|
||||
|
||||
setting 'repositories.url.allowed_urls', 'http://snapshot.test*'
|
||||
setting 'path.repo', "${buildDir}/cluster/shared/repo/${baseName}"
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
}
|
||||
def baseCluster = testClusters.register(baseName) {
|
||||
versions = [bwcVersionString, project.version]
|
||||
numberOfNodes = 3
|
||||
|
||||
setting 'repositories.url.allowed_urls', 'http://snapshot.test*'
|
||||
setting 'path.repo', "${buildDir}/cluster/shared/repo/${baseName}"
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
}
|
||||
|
||||
String oldVersion = bwcVersion.toString()
|
||||
|
||||
tasks.register("${baseName}#oldClusterTest", StandaloneRestIntegTestTask) {
|
||||
dependsOn "processTestResources"
|
||||
useCluster testClusters."${baseName}"
|
||||
useCluster baseCluster
|
||||
mustRunAfter("precommit")
|
||||
doFirst {
|
||||
delete("${buildDir}/cluster/shared/repo/${baseName}")
|
||||
}
|
||||
systemProperty 'tests.rest.suite', 'old_cluster'
|
||||
systemProperty 'tests.upgrade_from_version', oldVersion
|
||||
nonInputProperties.systemProperty('tests.rest.cluster', "${-> testClusters."${baseName}".allHttpSocketURI.join(",")}")
|
||||
nonInputProperties.systemProperty('tests.clustername', "${-> testClusters."${baseName}".getName()}")
|
||||
nonInputProperties.systemProperty('tests.rest.cluster', baseCluster.map(c -> c.allHttpSocketURI.join(",")))
|
||||
nonInputProperties.systemProperty('tests.clustername', baseName)
|
||||
}
|
||||
|
||||
tasks.register("${baseName}#oneThirdUpgradedTest", StandaloneRestIntegTestTask) {
|
||||
dependsOn "${baseName}#oldClusterTest"
|
||||
useCluster testClusters."${baseName}"
|
||||
useCluster baseCluster
|
||||
doFirst {
|
||||
testClusters."${baseName}".nextNodeToNextVersion()
|
||||
baseCluster.get().nextNodeToNextVersion()
|
||||
}
|
||||
systemProperty 'tests.rest.suite', 'mixed_cluster'
|
||||
systemProperty 'tests.upgrade_from_version', oldVersion
|
||||
systemProperty 'tests.first_round', 'true'
|
||||
nonInputProperties.systemProperty('tests.rest.cluster', "${-> testClusters."${baseName}".allHttpSocketURI.join(",")}")
|
||||
nonInputProperties.systemProperty('tests.clustername', "${-> testClusters."${baseName}".getName()}")
|
||||
nonInputProperties.systemProperty('tests.rest.cluster', baseCluster.map(c -> c.allHttpSocketURI.join(",")))
|
||||
nonInputProperties.systemProperty('tests.clustername', baseName)
|
||||
}
|
||||
|
||||
tasks.register("${baseName}#twoThirdsUpgradedTest", StandaloneRestIntegTestTask) {
|
||||
dependsOn "${baseName}#oneThirdUpgradedTest"
|
||||
useCluster testClusters."${baseName}"
|
||||
useCluster baseCluster
|
||||
doFirst {
|
||||
testClusters."${baseName}".nextNodeToNextVersion()
|
||||
baseCluster.get().nextNodeToNextVersion()
|
||||
}
|
||||
systemProperty 'tests.rest.suite', 'mixed_cluster'
|
||||
systemProperty 'tests.upgrade_from_version', oldVersion
|
||||
systemProperty 'tests.first_round', 'false'
|
||||
nonInputProperties.systemProperty('tests.rest.cluster', "${-> testClusters."${baseName}".allHttpSocketURI.join(",")}")
|
||||
nonInputProperties.systemProperty('tests.clustername', "${-> testClusters."${baseName}".getName()}")
|
||||
nonInputProperties.systemProperty('tests.rest.cluster', baseCluster.map(c -> c.allHttpSocketURI.join(",")))
|
||||
nonInputProperties.systemProperty('tests.clustername', baseName)
|
||||
}
|
||||
|
||||
tasks.register("${baseName}#upgradedClusterTest", StandaloneRestIntegTestTask) {
|
||||
dependsOn "${baseName}#twoThirdsUpgradedTest"
|
||||
doFirst {
|
||||
testClusters."${baseName}".nextNodeToNextVersion()
|
||||
baseCluster.get().nextNodeToNextVersion()
|
||||
}
|
||||
useCluster testClusters."${baseName}"
|
||||
useCluster testClusters.named(baseName)
|
||||
systemProperty 'tests.rest.suite', 'upgraded_cluster'
|
||||
systemProperty 'tests.upgrade_from_version', oldVersion
|
||||
nonInputProperties.systemProperty('tests.rest.cluster', "${-> testClusters."${baseName}".allHttpSocketURI.join(",")}")
|
||||
nonInputProperties.systemProperty('tests.clustername', "${-> testClusters."${baseName}".getName()}")
|
||||
nonInputProperties.systemProperty('tests.rest.cluster', baseCluster.map(c -> c.allHttpSocketURI.join(",")))
|
||||
nonInputProperties.systemProperty('tests.clustername', baseName)
|
||||
}
|
||||
|
||||
tasks.register(bwcTaskName(bwcVersion)) {
|
||||
|
|
|
@ -17,6 +17,6 @@ dependencies {
|
|||
testImplementation project(':plugins:transport-nio') // for http
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ dependencies {
|
|||
testImplementation project(':modules:ingest-common')
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ dependencies {
|
|||
testImplementation project(':modules:reindex')
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ testClusters.matching { it.name == "integTest" }.configureEach {
|
|||
setting 'path.repo', repo.absolutePath
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
if (BuildParams.isSnapshotBuild() == false) {
|
||||
systemProperty 'es.index_mode_feature_flag_registered', 'true'
|
||||
|
|
|
@ -22,7 +22,7 @@ tasks.named("javaRestTest").configure {
|
|||
dependsOn "buildZip"
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
setting 'xpack.security.autoconfiguration.enabled', 'false'
|
||||
|
|
|
@ -10,7 +10,7 @@ apply plugin: 'elasticsearch.internal-testclusters'
|
|||
apply plugin: 'elasticsearch.standalone-rest-test'
|
||||
apply plugin: 'elasticsearch.rest-test'
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
}
|
||||
|
||||
|
|
|
@ -16,20 +16,19 @@ apply plugin: 'elasticsearch.standalone-rest-test'
|
|||
apply plugin: 'elasticsearch.bwc-test'
|
||||
|
||||
for (Version bwcVersion : BuildParams.bwcVersions.indexCompatible) {
|
||||
String baseName = "v${bwcVersion}"
|
||||
String bwcVersionString = bwcVersion.toString()
|
||||
String baseName = "v${bwcVersionString}"
|
||||
|
||||
testClusters {
|
||||
"${baseName}" {
|
||||
version = bwcVersion.toString()
|
||||
def baseCluster = testClusters.register(baseName) {
|
||||
version = bwcVersionString
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
user username: 'admin', password: 'admin-password', role: 'superuser'
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register("${baseName}#integTest", StandaloneRestIntegTestTask) {
|
||||
useCluster testClusters."${baseName}"
|
||||
nonInputProperties.systemProperty('tests.rest.cluster', "${-> testClusters."${baseName}".allHttpSocketURI.join(",")}")
|
||||
nonInputProperties.systemProperty('tests.clustername', "${-> testClusters."${baseName}".getName()}")
|
||||
useCluster baseCluster
|
||||
nonInputProperties.systemProperty('tests.rest.cluster', baseCluster.map(c -> c.allHttpSocketURI.join(",")))
|
||||
nonInputProperties.systemProperty('tests.clustername', "${->baseCluster.get().getName()}")
|
||||
}
|
||||
|
||||
tasks.register(bwcTaskName(bwcVersion)) {
|
||||
|
@ -60,5 +59,5 @@ tasks.register("verifyDocsLuceneVersion") {
|
|||
}
|
||||
|
||||
tasks.named("check").configure {
|
||||
dependsOn verifyDocsLuceneVersion
|
||||
dependsOn "verifyDocsLuceneVersion"
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ artifacts {
|
|||
restTests(new File(projectDir, "src/yamlRestTest/resources/rest-api-spec/test"))
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
module ':modules:mapper-extras'
|
||||
if (BuildParams.isSnapshotBuild() == false) {
|
||||
systemProperty 'es.index_mode_feature_flag_registered', 'true'
|
||||
|
|
|
@ -16,7 +16,7 @@ tasks.named("javaRestTest").configure {
|
|||
it.onlyIf { BuildParams.isSnapshotBuild() }
|
||||
systemProperty 'tests.security.manager', 'false'
|
||||
systemProperty 'tests.system_call_filter', 'false'
|
||||
nonInputProperties.systemProperty 'log', "${-> testClusters.javaRestTest.singleNode().getServerLog()}"
|
||||
nonInputProperties.systemProperty 'log', testClusters.named("javaRestTest").map(c -> c.singleNode().getServerLog())
|
||||
systemProperty 'runtime.java.home', BuildParams.runtimeJavaHome
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ restResources {
|
|||
}
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ dependencies {
|
|||
javaRestTestImplementation project(':test:framework')
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
numberOfNodes = 2
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
|
|
|
@ -13,7 +13,7 @@ restResources {
|
|||
}
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
|
|
|
@ -207,7 +207,7 @@ tasks.named("yamlRestTestV7CompatTest").configure {
|
|||
dependsOn "copyExtraResources"
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT' // this is important since we use the reindex module in ML
|
||||
setting 'xpack.ml.enabled', 'true'
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
|
|
|
@ -10,23 +10,20 @@ dependencies {
|
|||
testImplementation project(':x-pack:plugin:ccr:qa')
|
||||
}
|
||||
|
||||
def leaderCluster = testClusters.register("leader-cluster") {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
user username: 'admin', password: 'admin-password', role: 'superuser'
|
||||
}
|
||||
|
||||
testClusters {
|
||||
"leader-cluster" {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
user username: 'admin', password: 'admin-password', role: 'superuser'
|
||||
}
|
||||
|
||||
"follow-cluster" {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.monitoring.collection.enabled', 'true'
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
user username: 'admin', password: 'admin-password', role: 'superuser'
|
||||
setting 'cluster.remote.leader_cluster.seeds', { "\"${testClusters."leader-cluster".getAllTransportPortURI().join(",")}\""
|
||||
}
|
||||
def followCluster = testClusters.register("follow-cluster") {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.monitoring.collection.enabled', 'true'
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
user username: 'admin', password: 'admin-password', role: 'superuser'
|
||||
setting 'cluster.remote.leader_cluster.seeds', { "\"${leaderCluster.get().getAllTransportPortURI().join(",")}\""
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,11 +50,11 @@ tasks.register("writeJavaPolicy") {
|
|||
|
||||
tasks.register("follow-cluster", RestIntegTestTask) {
|
||||
dependsOn 'writeJavaPolicy', "leader-cluster"
|
||||
useCluster testClusters."leader-cluster"
|
||||
useCluster leaderCluster
|
||||
systemProperty 'java.security.policy', "file://${policyFile}"
|
||||
systemProperty 'tests.target_cluster', 'follow'
|
||||
nonInputProperties.systemProperty 'tests.leader_host', "${-> testClusters."leader-cluster".getAllHttpSocketURI().get(0)}"
|
||||
nonInputProperties.systemProperty 'log', "${-> testClusters."follow-cluster".getFirstNode().getServerLog()}"
|
||||
nonInputProperties.systemProperty 'tests.leader_host', leaderCluster.map(c -> c.allHttpSocketURI.get(0))
|
||||
nonInputProperties.systemProperty 'log', followCluster.map(c -> c.getFirstNode().getServerLog())
|
||||
}
|
||||
|
||||
tasks.named("check").configure { dependsOn "follow-cluster" }
|
||||
|
|
|
@ -9,22 +9,21 @@ dependencies {
|
|||
testImplementation project(':x-pack:plugin:ccr:qa')
|
||||
}
|
||||
|
||||
testClusters {
|
||||
'leader-cluster' {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
user username: 'admin', password: 'admin-password', role: 'superuser'
|
||||
setting 'path.repo', "${buildDir}/cluster/shared/repo/leader-cluster"
|
||||
}
|
||||
'middle-cluster' {
|
||||
def leaderCluster = testClusters.register('leader-cluster') {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
user username: 'admin', password: 'admin-password', role: 'superuser'
|
||||
setting 'path.repo', "${buildDir}/cluster/shared/repo/leader-cluster"
|
||||
}
|
||||
|
||||
def middleCluster = testClusters.register('middle-cluster') {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
user username: 'admin', password: 'admin-password', role: 'superuser'
|
||||
setting 'cluster.remote.leader_cluster.seeds',
|
||||
{ "\"${testClusters.named('leader-cluster').get().getAllTransportPortURI().join(",")}\"" }
|
||||
}
|
||||
{ "\"${leaderCluster.get().getAllTransportPortURI().join(",")}\"" }
|
||||
}
|
||||
|
||||
tasks.register("leader-cluster", RestIntegTestTask) {
|
||||
|
@ -35,36 +34,33 @@ tasks.register("leader-cluster", RestIntegTestTask) {
|
|||
|
||||
tasks.register("middle-cluster", RestIntegTestTask) {
|
||||
dependsOn "leader-cluster"
|
||||
useCluster testClusters."leader-cluster"
|
||||
useCluster testClusters.named("leader-cluster")
|
||||
systemProperty 'tests.target_cluster', 'middle'
|
||||
systemProperty 'tests.leader_cluster_repository_path', "${buildDir}/cluster/shared/repo/leader-cluster"
|
||||
nonInputProperties.systemProperty 'tests.leader_host',
|
||||
"${-> testClusters.named('leader-cluster').get().getAllHttpSocketURI().get(0)}"
|
||||
nonInputProperties.systemProperty 'tests.leader_host',leaderCluster.map(c -> c.allHttpSocketURI.get(0))
|
||||
}
|
||||
|
||||
|
||||
tasks.register('follow-cluster', RestIntegTestTask) {
|
||||
dependsOn "leader-cluster", "middle-cluster"
|
||||
useCluster testClusters."leader-cluster"
|
||||
useCluster testClusters."middle-cluster"
|
||||
useCluster leaderCluster
|
||||
useCluster middleCluster
|
||||
systemProperty 'tests.target_cluster', 'follow'
|
||||
systemProperty 'tests.leader_cluster_repository_path', "${buildDir}/cluster/shared/repo/leader-cluster"
|
||||
nonInputProperties.systemProperty 'tests.leader_host',
|
||||
"${-> testClusters.named('leader-cluster').get().getAllHttpSocketURI().get(0)}"
|
||||
nonInputProperties.systemProperty 'tests.middle_host',
|
||||
"${-> testClusters.named('middle-cluster').get().getAllHttpSocketURI().get(0)}"
|
||||
nonInputProperties.systemProperty 'tests.leader_host', leaderCluster.map(c -> c.allHttpSocketURI.get(0))
|
||||
nonInputProperties.systemProperty 'tests.middle_host', middleCluster.map(c -> c.allHttpSocketURI.get(0))
|
||||
}
|
||||
|
||||
testClusters.matching { it.name == "follow-cluster" }.configureEach {
|
||||
testClusters.matching {it.name == "follow-cluster" }.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.monitoring.collection.enabled', 'true'
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
user username: 'admin', password: 'admin-password', role: 'superuser'
|
||||
setting 'cluster.remote.leader_cluster.seeds',
|
||||
{ "\"${testClusters.named('leader-cluster').get().getAllTransportPortURI().join(",")}\"" }
|
||||
{ "\"${leaderCluster.get().getAllTransportPortURI().join(",")}\"" }
|
||||
setting 'cluster.remote.middle_cluster.seeds',
|
||||
{ "\"${testClusters.named('middle-cluster').get().getAllTransportPortURI().join(",")}\"" }
|
||||
{ "\"${middleCluster.get().getAllTransportPortURI().join(",")}\"" }
|
||||
}
|
||||
|
||||
tasks.named("check").configure { dependsOn "follow-cluster" }
|
||||
tasks.named("check").configure { dependsOn "follow-cluster" }
|
||||
|
|
|
@ -9,21 +9,19 @@ dependencies {
|
|||
testImplementation project(':x-pack:plugin:ccr:qa:')
|
||||
}
|
||||
|
||||
testClusters {
|
||||
'leader-cluster' {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
user username: 'admin', password: 'admin-password', role: 'superuser'
|
||||
}
|
||||
def leaderCluster = testClusters.register('leader-cluster') {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
user username: 'admin', password: 'admin-password', role: 'superuser'
|
||||
}
|
||||
|
||||
'follow-cluster' {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
user username: 'admin', password: 'admin-password', role: 'superuser'
|
||||
setting 'cluster.remote.leader_cluster.seeds',
|
||||
{ "\"${testClusters.'leader-cluster'.getAllTransportPortURI().join(",")}\"" }
|
||||
}
|
||||
def followerCluster = testClusters.register('follow-cluster') {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
user username: 'admin', password: 'admin-password', role: 'superuser'
|
||||
setting 'cluster.remote.leader_cluster.seeds',
|
||||
{ "\"${leaderCluster.get().getAllTransportPortURI().join(",")}\"" }
|
||||
}
|
||||
|
||||
tasks.register('leader-cluster', RestIntegTestTask) {
|
||||
|
@ -33,10 +31,9 @@ tasks.register('leader-cluster', RestIntegTestTask) {
|
|||
|
||||
tasks.register('follow-cluster', RestIntegTestTask) {
|
||||
dependsOn 'leader-cluster'
|
||||
useCluster testClusters.'leader-cluster'
|
||||
useCluster leaderCluster
|
||||
systemProperty 'tests.target_cluster', 'follow'
|
||||
nonInputProperties.systemProperty 'tests.leader_host',
|
||||
{ "${testClusters.'follow-cluster'.getAllHttpSocketURI().get(0)}" }
|
||||
nonInputProperties.systemProperty 'tests.leader_host', followerCluster.map(c -> c.allHttpSocketURI.get(0))
|
||||
}
|
||||
|
||||
tasks.named("check").configure { dependsOn "follow-cluster" }
|
|
@ -11,7 +11,7 @@ dependencies {
|
|||
yamlRestTestImplementation(testArtifact(project(xpackModule('core'))))
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
// Disable assertions in FollowingEngineAssertions, otherwise an AssertionError is thrown before
|
||||
// indexing a document directly in a follower index. In a rest test we like to test the exception
|
||||
|
|
|
@ -8,26 +8,25 @@ dependencies {
|
|||
testImplementation project(':x-pack:plugin:ccr:qa')
|
||||
}
|
||||
|
||||
testClusters {
|
||||
'leader-cluster' {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
user username: 'admin', password: 'admin-password', role: 'superuser'
|
||||
}
|
||||
|
||||
'follow-cluster' {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.monitoring.collection.enabled', 'true'
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
user username: 'admin', password: 'admin-password', role: 'superuser'
|
||||
setting 'cluster.remote.leader_cluster.seeds',
|
||||
{ "\"${testClusters.'leader-cluster'.getAllTransportPortURI().get(0)}\"" }
|
||||
nameCustomization = { 'follow' }
|
||||
}
|
||||
def leaderCluster = testClusters.register('leader-cluster') {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
user username: 'admin', password: 'admin-password', role: 'superuser'
|
||||
}
|
||||
|
||||
def followCluster = testClusters.register('follow-cluster') {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.monitoring.collection.enabled', 'true'
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
user username: 'admin', password: 'admin-password', role: 'superuser'
|
||||
setting 'cluster.remote.leader_cluster.seeds',
|
||||
{ "\"${leaderCluster.get().getAllTransportPortURI().get(0)}\"" }
|
||||
nameCustomization = { 'follow' }
|
||||
}
|
||||
|
||||
|
||||
tasks.register('leader-cluster', RestIntegTestTask) {
|
||||
mustRunAfter("precommit")
|
||||
systemProperty 'tests.target_cluster', 'leader'
|
||||
|
@ -35,23 +34,23 @@ tasks.register('leader-cluster', RestIntegTestTask) {
|
|||
|
||||
tasks.register('follow-cluster', RestIntegTestTask) {
|
||||
dependsOn 'leader-cluster'
|
||||
useCluster testClusters.'leader-cluster'
|
||||
useCluster leaderCluster
|
||||
systemProperty 'tests.target_cluster', 'follow'
|
||||
nonInputProperties.systemProperty 'tests.leader_host',
|
||||
"${-> testClusters.'leader-cluster'.getAllHttpSocketURI().get(0)}"
|
||||
"${-> leaderCluster.get().getAllHttpSocketURI().get(0)}"
|
||||
}
|
||||
|
||||
tasks.register("followClusterRestartTest", StandaloneRestIntegTestTask) {
|
||||
dependsOn 'follow-cluster'
|
||||
useCluster testClusters.'leader-cluster'
|
||||
useCluster testClusters.'follow-cluster'
|
||||
useCluster leaderCluster
|
||||
useCluster followCluster
|
||||
|
||||
systemProperty 'tests.rest.load_packaged', 'false'
|
||||
systemProperty 'tests.target_cluster', 'follow-restart'
|
||||
doFirst {
|
||||
testClusters.'follow-cluster'.restart()
|
||||
nonInputProperties.systemProperty 'tests.leader_host', "${-> testClusters.'leader-cluster'.getAllHttpSocketURI().get(0)}"
|
||||
nonInputProperties.systemProperty 'tests.rest.cluster', "${-> testClusters.'follow-cluster'.getAllHttpSocketURI().join(",")}"
|
||||
followCluster.get().restart()
|
||||
nonInputProperties.systemProperty 'tests.leader_host', leaderCluster.map(c-> c.getAllHttpSocketURI().get(0))
|
||||
nonInputProperties.systemProperty 'tests.rest.cluster', followCluster.map(c -> c.getAllHttpSocketURI().join(","))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -18,20 +18,19 @@ tasks.register("resolve") {
|
|||
}
|
||||
}
|
||||
|
||||
testClusters {
|
||||
'leader-cluster' {
|
||||
def leadCluster = testClusters.register('leader-cluster') {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
extraConfigFile 'roles.yml', file('leader-roles.yml')
|
||||
user username: "test_admin", role: "superuser"
|
||||
user username: "test_ccr", role: "ccruser"
|
||||
}
|
||||
}
|
||||
|
||||
'follow-cluster' {
|
||||
def followCluster = testClusters.register('follow-cluster') {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'cluster.remote.leader_cluster.seeds', {
|
||||
"\"${testClusters.'leader-cluster'.getAllTransportPortURI().join(",")}\""
|
||||
"\"${leadCluster.get().getAllTransportPortURI().join(",")}\""
|
||||
}
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
|
@ -39,7 +38,6 @@ testClusters {
|
|||
extraConfigFile 'roles.yml', file('follower-roles.yml')
|
||||
user username: "test_admin", role: "superuser"
|
||||
user username: "test_ccr", role: "ccruser"
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register('leader-cluster', RestIntegTestTask) {
|
||||
|
@ -49,9 +47,9 @@ tasks.register('leader-cluster', RestIntegTestTask) {
|
|||
|
||||
tasks.register('follow-cluster', RestIntegTestTask) {
|
||||
dependsOn 'leader-cluster'
|
||||
useCluster testClusters.'leader-cluster'
|
||||
useCluster leadCluster
|
||||
systemProperty 'tests.target_cluster', 'follow'
|
||||
nonInputProperties.systemProperty 'tests.leader_host', "${-> testClusters.'leader-cluster'.getAllHttpSocketURI().get(0)}"
|
||||
nonInputProperties.systemProperty 'tests.leader_host', leadCluster.map(c-> c.getAllHttpSocketURI().get(0))
|
||||
}
|
||||
|
||||
tasks.named("check").configure { dependsOn('follow-cluster') }
|
||||
tasks.named("check").configure { dependsOn('follow-cluster') }
|
||||
|
|
|
@ -129,7 +129,7 @@ restResources {
|
|||
}
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'default'
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
|
|
|
@ -14,7 +14,7 @@ restResources {
|
|||
}
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
// Data streams is basic, but a few tests test data streams in combination with paid features
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
|
|
|
@ -24,7 +24,7 @@ restResources {
|
|||
}
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
|
|
|
@ -5,7 +5,7 @@ dependencies {
|
|||
api project(':test:framework')
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.license.self_generated.type', 'basic'
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
|
|
|
@ -7,7 +7,7 @@ dependencies {
|
|||
javaRestTestImplementation project(path: xpackModule('enrich:qa:common'))
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
extraConfigFile 'roles.yml', file('roles.yml')
|
||||
user username: "test_admin", password: "x-pack-test-password", role: "superuser"
|
||||
|
|
|
@ -11,7 +11,7 @@ if (BuildParams.inFipsJvm){
|
|||
tasks.named("javaRestTest").configure{enabled = false }
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
extraConfigFile 'roles.yml', file('roles.yml')
|
||||
user username: "test_admin", password: "x-pack-test-password", role: "superuser"
|
||||
|
|
|
@ -23,7 +23,7 @@ if (BuildParams.inFipsJvm){
|
|||
tasks.named("yamlRestTest").configure{enabled = false }
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.license.self_generated.type', 'basic'
|
||||
setting 'xpack.monitoring.collection.enabled', 'true'
|
||||
|
|
|
@ -26,10 +26,10 @@ Boolean preserveData = providers.systemProperty('eql.test.preserve.data')
|
|||
|
||||
if (BuildParams.inFipsJvm){
|
||||
// This test cluster is using a BASIC license and FIPS 140 mode is not supported in BASIC
|
||||
tasks.named("javaRestTest").configure{enabled = false }
|
||||
tasks.named("javaRestTest").configure{ enabled = false }
|
||||
}
|
||||
testClusters {
|
||||
all {
|
||||
|
||||
testClusters.configureEach {
|
||||
plugin ':plugins:repository-gcs'
|
||||
if (serviceAccountFile) {
|
||||
keystore 'gcs.client.eql_test.credentials_file', serviceAccountFile
|
||||
|
@ -42,10 +42,10 @@ testClusters {
|
|||
jvmArgs '-Xms4g', '-Xmx4g'
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
user username: 'admin', password: 'admin-password', role: 'superuser'
|
||||
}
|
||||
runTask {
|
||||
jvmArgs '-Xms8g', '-Xmx8g'
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(RunTask).configureEach {
|
||||
jvmArgs '-Xms8g', '-Xmx8g'
|
||||
}
|
||||
|
||||
tasks.named('javaRestTest').configure {
|
||||
|
@ -57,6 +57,6 @@ tasks.named('javaRestTest').configure {
|
|||
}
|
||||
|
||||
tasks.register("runEqlCorrectnessNode", RunTask) {
|
||||
useCluster testClusters.runTask
|
||||
useCluster testClusters.named('runTask')
|
||||
description = 'Runs elasticsearch in the foreground with gcs plugin and keystore credentials'
|
||||
}
|
||||
|
|
|
@ -22,11 +22,11 @@ for (Version bwcVersion : BuildParams.bwcVersions.wireCompatible.findAll { it.on
|
|||
continue;
|
||||
}
|
||||
|
||||
String baseName = "v${bwcVersion}"
|
||||
String bwcVersionString = bwcVersion.toString()
|
||||
String baseName = "v" + bwcVersion
|
||||
|
||||
testClusters {
|
||||
"${baseName}" {
|
||||
versions = [bwcVersion.toString(), project.version]
|
||||
def cluster = testClusters.register(baseName) {
|
||||
versions = [bwcVersionString, project.version]
|
||||
numberOfNodes = 3
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
|
@ -36,21 +36,20 @@ for (Version bwcVersion : BuildParams.bwcVersions.wireCompatible.findAll { it.on
|
|||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
// for debugging purposes
|
||||
// setting 'logger.org.elasticsearch.xpack.eql.plugin.TransportEqlSearchAction', 'TRACE'
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register("${baseName}#mixedClusterTest", StandaloneRestIntegTestTask) {
|
||||
useCluster testClusters."${baseName}"
|
||||
useCluster cluster
|
||||
mustRunAfter("precommit")
|
||||
doFirst {
|
||||
// Getting the endpoints causes a wait for the cluster
|
||||
println "Endpoints are: ${-> testClusters."${baseName}".allHttpSocketURI.join(",")}"
|
||||
println "Upgrading one node to create a mixed cluster"
|
||||
testClusters."${baseName}".nextNodeToNextVersion()
|
||||
cluster.get().nextNodeToNextVersion()
|
||||
|
||||
println "Upgrade complete, endpoints are: ${-> testClusters."${baseName}".allHttpSocketURI.join(",")}"
|
||||
nonInputProperties.systemProperty('tests.rest.cluster', "${-> testClusters."${baseName}".allHttpSocketURI.join(",")}")
|
||||
nonInputProperties.systemProperty('tests.clustername', "${-> testClusters."${baseName}".getName()}")
|
||||
println "Upgrade complete, endpoints are: ${-> testClusters.named(baseName).get().allHttpSocketURI.join(",")}"
|
||||
nonInputProperties.systemProperty('tests.rest.cluster', cluster.map(c->c.allHttpSocketURI.join(",")))
|
||||
nonInputProperties.systemProperty('tests.clustername', baseName)
|
||||
}
|
||||
onlyIf { project.bwc_tests_enabled }
|
||||
}
|
||||
|
|
|
@ -8,36 +8,34 @@ dependencies {
|
|||
testImplementation project(path: xpackModule('eql:qa:common'))
|
||||
}
|
||||
|
||||
testClusters {
|
||||
'remote-cluster' {
|
||||
testDistribution = 'DEFAULT'
|
||||
numberOfNodes = 2
|
||||
setting 'node.roles', '[data,ingest,master]'
|
||||
setting 'xpack.ml.enabled', 'false'
|
||||
setting 'xpack.watcher.enabled', 'false'
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
setting 'xpack.security.autoconfiguration.enabled', 'false'
|
||||
def remoteClusterReg = testClusters.register('remote-cluster') {
|
||||
testDistribution = 'DEFAULT'
|
||||
numberOfNodes = 2
|
||||
setting 'node.roles', '[data,ingest,master]'
|
||||
setting 'xpack.ml.enabled', 'false'
|
||||
setting 'xpack.watcher.enabled', 'false'
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
setting 'xpack.security.autoconfiguration.enabled', 'false'
|
||||
|
||||
user username: "test_user", password: "x-pack-test-password"
|
||||
user username: "test_user", password: "x-pack-test-password"
|
||||
}
|
||||
|
||||
def integTestClusterReg = testClusters.register('integTest') {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.ml.enabled', 'false'
|
||||
setting 'xpack.watcher.enabled', 'false'
|
||||
setting 'cluster.remote.my_remote_cluster.seeds', {
|
||||
remoteClusterReg.get().getAllTransportPortURI().collect { "\"$it\"" }.toString()
|
||||
}
|
||||
setting 'cluster.remote.connections_per_cluster', "1"
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
setting 'xpack.security.autoconfiguration.enabled', 'false'
|
||||
|
||||
'integTest' {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.ml.enabled', 'false'
|
||||
setting 'xpack.watcher.enabled', 'false'
|
||||
setting 'cluster.remote.my_remote_cluster.seeds', {
|
||||
testClusters.'remote-cluster'.getAllTransportPortURI().collect { "\"$it\"" }.toString()
|
||||
}
|
||||
setting 'cluster.remote.connections_per_cluster', "1"
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
setting 'xpack.security.autoconfiguration.enabled', 'false'
|
||||
|
||||
user username: "test_user", password: "x-pack-test-password"
|
||||
}
|
||||
user username: "test_user", password: "x-pack-test-password"
|
||||
}
|
||||
|
||||
tasks.register("startRemoteCluster", DefaultTestClustersTask.class) {
|
||||
useCluster testClusters.'remote-cluster'
|
||||
useCluster remoteClusterReg
|
||||
doLast {
|
||||
"Starting remote cluster before integ tests and integTest cluster is started"
|
||||
}
|
||||
|
@ -45,9 +43,9 @@ tasks.register("startRemoteCluster", DefaultTestClustersTask.class) {
|
|||
|
||||
tasks.named("integTest").configure {
|
||||
dependsOn 'startRemoteCluster'
|
||||
useCluster testClusters.'remote-cluster'
|
||||
useCluster remoteClusterReg
|
||||
doFirst {
|
||||
nonInputProperties.systemProperty 'tests.rest.cluster.remote.host', "${-> testClusters.'remote-cluster'.getAllHttpSocketURI().get(0)}"
|
||||
nonInputProperties.systemProperty 'tests.rest.cluster.remote.host', remoteClusterReg.map(c->c.getAllHttpSocketURI().get(0))
|
||||
nonInputProperties.systemProperty 'tests.rest.cluster.remote.user', "test_user"
|
||||
nonInputProperties.systemProperty 'tests.rest.cluster.remote.password', "x-pack-test-password"
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ if (BuildParams.inFipsJvm){
|
|||
tasks.named("javaRestTest").configure{enabled = false }
|
||||
tasks.named("yamlRestTest").configure{enabled = false }
|
||||
}
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.license.self_generated.type', 'basic'
|
||||
setting 'xpack.monitoring.collection.enabled', 'true'
|
||||
|
|
|
@ -11,7 +11,7 @@ if (BuildParams.inFipsJvm){
|
|||
tasks.named("javaRestTest").configure{enabled = false }
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.license.self_generated.type', 'basic'
|
||||
setting 'xpack.monitoring.collection.enabled', 'true'
|
||||
|
|
|
@ -23,7 +23,7 @@ dependencies {
|
|||
javaRestTestImplementation(testArtifact(project(xpackModule('core'))))
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
setting 'xpack.security.autoconfiguration.enabled', 'false'
|
||||
|
|
|
@ -12,7 +12,7 @@ restResources {
|
|||
}
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ restResources {
|
|||
}
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
|
|
|
@ -7,7 +7,7 @@ dependencies {
|
|||
javaRestTestImplementation project(path: xpackModule('identity-provider'))
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
|
|
|
@ -32,7 +32,7 @@ testClusters.matching { it.name == 'leader-cluster' }.configureEach {
|
|||
|
||||
tasks.register('follow-cluster', RestIntegTestTask) {
|
||||
dependsOn tasks.findByName('leader-cluster')
|
||||
useCluster testClusters.'leader-cluster'
|
||||
useCluster testClusters.named('leader-cluster')
|
||||
systemProperty 'tests.target_cluster', 'follow'
|
||||
nonInputProperties.systemProperty 'tests.leader_host',
|
||||
"${-> testClusters."leader-cluster".getAllHttpSocketURI().get(0)}"
|
||||
|
|
|
@ -15,7 +15,7 @@ tasks.named("javaRestTest").configure {
|
|||
systemProperty 'es.rollup_v2_feature_flag_enabled', 'true'
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
numberOfNodes = 4
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ dependencies {
|
|||
javaRestTestImplementation(testArtifact(project(xpackModule('core'))))
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.watcher.enabled', 'false'
|
||||
setting 'xpack.watcher.enabled', 'false'
|
||||
|
|
|
@ -17,7 +17,7 @@ dependencies {
|
|||
javaRestTestImplementation(testArtifact(project(xpackModule('core'))))
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
user username: 'x_pack_rest_user', password: 'x-pack-test-password', role: 'superuser'
|
||||
|
|
|
@ -2,7 +2,7 @@ import org.elasticsearch.gradle.internal.info.BuildParams
|
|||
|
||||
apply plugin: 'elasticsearch.internal-java-rest-test'
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
numberOfNodes = 3
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
|
|
|
@ -7,7 +7,7 @@ apply plugin: 'elasticsearch.internal-java-rest-test'
|
|||
// testImplementation project(path: xpackModule('ml'))
|
||||
//}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
setting 'xpack.ml.enabled', 'false'
|
||||
|
|
|
@ -229,7 +229,7 @@ tasks.named("yamlRestTest").configure {
|
|||
].join(',')
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
extraConfigFile 'roles.yml', file('roles.yml')
|
||||
user username: "x_pack_rest_user", password: "x-pack-test-password"
|
||||
|
|
|
@ -28,7 +28,7 @@ tasks.named("javaRestTest").configure {
|
|||
dependsOn "copyKeyCerts"
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
numberOfNodes = 3
|
||||
testDistribution = 'DEFAULT'
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import org.elasticsearch.gradle.internal.info.BuildParams
|
|||
|
||||
apply plugin: 'elasticsearch.internal-java-rest-test'
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
|
|
|
@ -14,7 +14,7 @@ dependencies {
|
|||
testImplementation(testArtifact(project(xpackModule('core'))))
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ if (useFixture) {
|
|||
testFixtures.useFixture(fixture.path, 'azure-fixture-repositories-metering')
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ if (!gcsServiceAccount && !gcsBucket && !gcsBasePath) {
|
|||
serviceAccountFile = new File(gcsServiceAccount)
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ restResources {
|
|||
}
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.license.self_generated.type', 'basic'
|
||||
systemProperty 'es.rollup_v2_feature_flag_enabled', 'true'
|
||||
|
|
|
@ -18,7 +18,7 @@ tasks.withType(Test).configureEach {
|
|||
systemProperty 'tests.path.repo', repoDir
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'path.repo', repoDir.absolutePath
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
|
|
|
@ -25,21 +25,19 @@ if (BuildParams.inFipsJvm){
|
|||
tasks.named("javaRestTest").configure{enabled = false }
|
||||
}
|
||||
|
||||
testClusters {
|
||||
javaRestTest {
|
||||
def cluster = testClusters.register("javaRestTest") {
|
||||
testDistribution = 'DEFAULT'
|
||||
numberOfNodes = 2
|
||||
setting 'xpack.ml.enabled', 'false'
|
||||
setting 'xpack.license.self_generated.type', 'basic'
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register("javaRestTestWithSecurityEnabled", StandaloneRestIntegTestTask) {
|
||||
mustRunAfter("javaRestTest")
|
||||
description = "Run tests against a cluster that has security enabled"
|
||||
dependsOn "javaRestTest"
|
||||
useCluster testClusters.javaRestTest
|
||||
useCluster cluster
|
||||
systemProperty 'tests.has_security', 'true'
|
||||
testClassesDirs = sourceSets.javaRestTest.output.classesDirs
|
||||
classpath = sourceSets.javaRestTest.runtimeClasspath
|
||||
|
@ -47,7 +45,7 @@ tasks.register("javaRestTestWithSecurityEnabled", StandaloneRestIntegTestTask) {
|
|||
BuildParams.inFipsJvm == false
|
||||
}
|
||||
doFirst {
|
||||
testClusters.javaRestTest {
|
||||
cluster.configure {
|
||||
// TODO Rene: revisit if using dedicated new cluster definitions would be more efficient.
|
||||
// Reconfigure cluster to enable security
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
|
@ -68,8 +66,7 @@ tasks.register("javaRestTestWithSecurityEnabled", StandaloneRestIntegTestTask) {
|
|||
|
||||
restart()
|
||||
}
|
||||
nonInputProperties.systemProperty 'tests.rest.cluster', "${-> testClusters.javaRestTest.getAllHttpSocketURI().join(",")}"
|
||||
nonInputProperties.systemProperty 'tests.rest.cluster', cluster.map(c->c.getAllHttpSocketURI().join(","))
|
||||
}
|
||||
}
|
||||
tasks.named("check").configure { dependsOn("javaRestTestWithSecurityEnabled") }
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ tasks.named("javaRestTest").configure {
|
|||
systemProperty 'tests.path.repo', repoDir
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
numberOfNodes = 3
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ if (BuildParams.inFipsJvm){
|
|||
tasks.named("javaRestTest").configure{enabled = false }
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
numberOfNodes = 2
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ dependencies {
|
|||
javaRestTestImplementation(testArtifact(project(xpackModule('core'))))
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
numberOfNodes = 2
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ dependencies {
|
|||
|
||||
addQaCheckDependencies()
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'default'
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
|
|
|
@ -7,7 +7,7 @@ dependencies {
|
|||
javaRestTestImplementation(testArtifact(project(xpackModule('core'))))
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
numberOfNodes = 4
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ if (useFixture) {
|
|||
testFixtures.useFixture(fixture.path, 'azure-fixture-repository-test-kit')
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ restResources {
|
|||
}
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
|
|
|
@ -59,7 +59,7 @@ subprojects {
|
|||
apply plugin: 'elasticsearch.internal-testclusters'
|
||||
apply plugin: 'elasticsearch.rest-test'
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.ml.enabled', 'false'
|
||||
setting 'xpack.watcher.enabled', 'false'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
description = 'Run SQL JDBC tests against multiple nodes'
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
numberOfNodes = 2
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ subprojects {
|
|||
testArtifacts testArtifact(project(mainProject.path))
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
// Setup auditing so we can use it in some tests
|
||||
setting 'xpack.security.audit.enabled', 'true'
|
||||
|
|
|
@ -2,7 +2,7 @@ import org.elasticsearch.gradle.internal.info.BuildParams
|
|||
|
||||
apply plugin: 'elasticsearch.test-with-ssl'
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
// The setup that we actually want
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
setting 'xpack.security.http.ssl.enabled', 'true'
|
||||
|
|
|
@ -4,6 +4,6 @@ tasks.withType(RestIntegTestTask).configureEach {
|
|||
systemProperty 'tests.ssl.enabled', 'false'
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ dependencies {
|
|||
testImplementation project(xpackModule('sql'))
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
}
|
||||
|
||||
|
@ -27,11 +27,11 @@ for (Version bwcVersion : BuildParams.bwcVersions.wireCompatible.findAll { it.on
|
|||
continue;
|
||||
}
|
||||
|
||||
String baseName = "v${bwcVersion}"
|
||||
String bwcVersionString = bwcVersion.toString()
|
||||
String baseName = "v" + bwcVersion
|
||||
|
||||
testClusters {
|
||||
"${baseName}" {
|
||||
versions = [bwcVersion.toString(), project.version]
|
||||
def baseCluster = testClusters.register(baseName) {
|
||||
versions = [bwcVersionString, project.version]
|
||||
numberOfNodes = 3
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
|
@ -40,21 +40,21 @@ for (Version bwcVersion : BuildParams.bwcVersions.wireCompatible.findAll { it.on
|
|||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
// for debugging purposes
|
||||
// setting 'logger.org.elasticsearch.xpack.sql.plugin.TransportSqlQueryAction', 'TRACE'
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register("${baseName}#mixedClusterTest", StandaloneRestIntegTestTask) {
|
||||
useCluster testClusters."${baseName}"
|
||||
useCluster baseCluster
|
||||
mustRunAfter("precommit")
|
||||
doFirst {
|
||||
def cluster = baseCluster.get()
|
||||
// Getting the endpoints causes a wait for the cluster
|
||||
println "Endpoints are: ${-> testClusters."${baseName}".allHttpSocketURI.join(",")}"
|
||||
println "Endpoints are: ${-> cluster.allHttpSocketURI.join(",")}"
|
||||
println "Upgrading one node to create a mixed cluster"
|
||||
testClusters."${baseName}".nextNodeToNextVersion()
|
||||
cluster.nextNodeToNextVersion()
|
||||
|
||||
println "Upgrade complete, endpoints are: ${-> testClusters."${baseName}".allHttpSocketURI.join(",")}"
|
||||
nonInputProperties.systemProperty('tests.rest.cluster', "${-> testClusters."${baseName}".allHttpSocketURI.join(",")}")
|
||||
nonInputProperties.systemProperty('tests.clustername', "${-> testClusters."${baseName}".getName()}")
|
||||
println "Upgrade complete, endpoints are: ${-> cluster.allHttpSocketURI.join(",")}"
|
||||
nonInputProperties.systemProperty('tests.rest.cluster', baseCluster.map(c->c.allHttpSocketURI.join(",")))
|
||||
nonInputProperties.systemProperty('tests.clustername', baseName)
|
||||
}
|
||||
onlyIf { project.bwc_tests_enabled }
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ restResources {
|
|||
}
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.ml.enabled', 'false'
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
|
|
|
@ -19,7 +19,7 @@ restResources {
|
|||
tasks.named("yamlRestTest").configure {
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
extraConfigFile 'roles.yml', file('roles.yml')
|
||||
user username: "x_pack_rest_user", password: "x-pack-test-password"
|
||||
|
|
|
@ -16,8 +16,7 @@ restResources {
|
|||
}
|
||||
|
||||
|
||||
testClusters {
|
||||
'remote-cluster' {
|
||||
def remoteCluster = testClusters.register('remote-cluster') {
|
||||
testDistribution = 'DEFAULT'
|
||||
numberOfNodes = 2
|
||||
setting 'node.roles', '[data,ingest,master]'
|
||||
|
@ -26,9 +25,9 @@ testClusters {
|
|||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
|
||||
user username: "test_user", password: "x-pack-test-password"
|
||||
}
|
||||
}
|
||||
|
||||
'mixed-cluster' {
|
||||
testClusters.register('mixed-cluster') {
|
||||
testDistribution = 'DEFAULT'
|
||||
numberOfNodes = 2
|
||||
// Node roles are configured this way in order to verify redirecting the transform request from the node lacking
|
||||
|
@ -39,12 +38,11 @@ testClusters {
|
|||
setting 'xpack.watcher.enabled', 'false'
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
setting 'cluster.remote.my_remote_cluster.seeds', {
|
||||
testClusters.'remote-cluster'.getAllTransportPortURI().collect { "\"$it\"" }.toString()
|
||||
remoteCluster.get().getAllTransportPortURI().collect { "\"$it\"" }.toString()
|
||||
}
|
||||
setting 'cluster.remote.connections_per_cluster', "1"
|
||||
|
||||
user username: "test_user", password: "x-pack-test-password"
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register('remote-cluster', RestIntegTestTask) {
|
||||
|
@ -52,10 +50,9 @@ tasks.register('remote-cluster', RestIntegTestTask) {
|
|||
systemProperty 'tests.rest.suite', 'remote_cluster'
|
||||
}
|
||||
|
||||
|
||||
tasks.register('mixed-cluster', RestIntegTestTask) {
|
||||
dependsOn 'remote-cluster'
|
||||
useCluster testClusters.'remote-cluster'
|
||||
useCluster remoteCluster
|
||||
systemProperty 'tests.rest.suite', 'multi_cluster'
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ dependencies {
|
|||
javaRestTestImplementation project(path: xpackModule('transform'))
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
|
|
|
@ -40,7 +40,7 @@ dependencies {
|
|||
yamlRestTestImplementation(testArtifact(project(xpackModule('core'))))
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
setting 'xpack.license.self_generated.type', 'trial'
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
|
|
|
@ -21,7 +21,7 @@ restResources {
|
|||
}
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
setting 'xpack.ml.enabled', 'false'
|
||||
|
|
|
@ -7,7 +7,7 @@ dependencies {
|
|||
javaRestTestImplementation project(path: ':x-pack:plugin:watcher:qa:common')
|
||||
}
|
||||
|
||||
testClusters.all {
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.monitoring.collection.enabled', 'true'
|
||||
setting 'xpack.monitoring.collection.interval', '1s'
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue