Skip to content

Commit d4f6f38

Browse files
aleksmausimotov
andauthored
EQL: Fix #51541: [CI] unknown setting [xpack.eql.enabled] in release-tests (#51699) (#51770)
Fixes #51541 Co-authored-by: Igor Motov <[email protected]>
1 parent 16ef6a5 commit d4f6f38

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

x-pack/plugin/eql/qa/common/src/main/java/org/elasticsearch/test/eql/CommonEqlRestTestCase.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@
66
package org.elasticsearch.test.eql;
77

88
import org.apache.http.util.EntityUtils;
9+
import org.elasticsearch.Build;
910
import org.elasticsearch.client.Request;
1011
import org.elasticsearch.client.Response;
1112
import org.elasticsearch.client.ResponseException;
1213
import org.elasticsearch.common.settings.Settings;
1314
import org.elasticsearch.test.rest.ESRestTestCase;
1415
import org.junit.After;
1516
import org.junit.Before;
17+
import org.junit.BeforeClass;
1618

1719
import java.util.ArrayList;
1820

@@ -62,6 +64,11 @@ static class SearchTestConfiguration {
6264
400, "query malformed, empty clause found"));
6365
}
6466

67+
@BeforeClass
68+
public static void checkForSnapshot() {
69+
assumeTrue("Only works on snapshot builds for now", Build.CURRENT.isSnapshot());
70+
}
71+
6572
@Before
6673
public void setup() throws Exception {
6774
createIndex(defaultValidationIndexName, Settings.EMPTY);

x-pack/plugin/eql/qa/rest/build.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import org.elasticsearch.gradle.info.BuildParams
2+
13
apply plugin: 'elasticsearch.testclusters'
24
apply plugin: 'elasticsearch.standalone-rest-test'
35
apply plugin: 'elasticsearch.rest-test'
@@ -9,7 +11,9 @@ dependencies {
911

1012
testClusters.integTest {
1113
testDistribution = 'DEFAULT'
12-
setting 'xpack.eql.enabled', 'true'
14+
if (BuildParams.isSnapshotBuild()) {
15+
setting 'xpack.eql.enabled', 'true'
16+
}
1317
setting 'xpack.license.self_generated.type', 'basic'
1418
setting 'xpack.monitoring.collection.enabled', 'true'
1519
}

x-pack/plugin/eql/qa/rest/src/test/java/org/elasticsearch/xpack/eql/EqlRestIT.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,18 @@
77
package org.elasticsearch.xpack.eql;
88

99
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
10+
import org.elasticsearch.Build;
1011
import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
1112
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
13+
import org.junit.BeforeClass;
1214

1315
public class EqlRestIT extends ESClientYamlSuiteTestCase {
1416

17+
@BeforeClass
18+
public static void checkForSnapshot() {
19+
assumeTrue("Only works on snapshot builds for now", Build.CURRENT.isSnapshot());
20+
}
21+
1522
public EqlRestIT(final ClientYamlTestCandidate testCandidate) {
1623
super(testCandidate);
1724
}

0 commit comments

Comments
 (0)