Fix data lifecycle tests for non-snapshot builds (#94146)

This fixes yaml tests when -Dbuild.snapshot is false.

The data lifecycle functionality is not enabled unless the feature flag
is configured.
This makes the yaml tests enable the feature flag for non-snapshot builds
(it's always enabled for snapshot builds)
This commit is contained in:
Andrei Dan 2023-02-27 13:08:13 +00:00 committed by GitHub
parent 729450833a
commit c63d0afb21
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,4 @@
import org.elasticsearch.gradle.Version
import org.elasticsearch.gradle.internal.info.BuildParams import org.elasticsearch.gradle.internal.info.BuildParams
apply plugin: 'elasticsearch.test-with-dependencies' apply plugin: 'elasticsearch.test-with-dependencies'
@ -26,6 +27,7 @@ testClusters.configureEach {
setting 'xpack.security.enabled', 'true' setting 'xpack.security.enabled', 'true'
keystore 'bootstrap.password', 'x-pack-test-password' keystore 'bootstrap.password', 'x-pack-test-password'
user username: "x_pack_rest_user", password: "x-pack-test-password" user username: "x_pack_rest_user", password: "x-pack-test-password"
requiresFeature 'es.dlm_feature_flag_enabled', Version.fromString("8.8.0")
} }
testClusters.matching { it.name == "javaRestTest" }.configureEach { testClusters.matching { it.name == "javaRestTest" }.configureEach {

View file

@ -29,6 +29,7 @@ public class ClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
public static ElasticsearchCluster cluster = ElasticsearchCluster.local() public static ElasticsearchCluster cluster = ElasticsearchCluster.local()
.module("mapper-extras") .module("mapper-extras")
.feature(FeatureFlag.TIME_SERIES_MODE) .feature(FeatureFlag.TIME_SERIES_MODE)
.feature(FeatureFlag.DLM_ENABLED)
.build(); .build();
public ClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate testCandidate) { public ClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate testCandidate) {

View file

@ -16,7 +16,8 @@ import org.elasticsearch.test.cluster.util.Version;
*/ */
public enum FeatureFlag { public enum FeatureFlag {
TIME_SERIES_MODE("es.index_mode_feature_flag_registered=true", Version.fromString("8.0.0"), null), TIME_SERIES_MODE("es.index_mode_feature_flag_registered=true", Version.fromString("8.0.0"), null),
NEW_RCS_MODE("es.untrusted_remote_cluster_feature_flag_registered=true", Version.fromString("8.5.0"), null); NEW_RCS_MODE("es.untrusted_remote_cluster_feature_flag_registered=true", Version.fromString("8.5.0"), null),
DLM_ENABLED("es.dlm_feature_flag_enabled=true", Version.fromString("8.8.0"), null);
public final String systemProperty; public final String systemProperty;
public final Version from; public final Version from;