EQL: Fix #51541: [CI] unknown setting [xpack.eql.enabled] in release-tests (#51699) (#51770)

Fixes #51541
Co-authored-by: Igor Motov <igor@motovs.org>
This commit is contained in:
Aleksandr Maus 2020-01-31 15:14:27 -05:00 committed by GitHub
parent 16ef6a5785
commit d4f6f38150
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 1 deletions

View File

@ -6,6 +6,7 @@
package org.elasticsearch.test.eql;
import org.apache.http.util.EntityUtils;
import org.elasticsearch.Build;
import org.elasticsearch.client.Request;
import org.elasticsearch.client.Response;
import org.elasticsearch.client.ResponseException;
@ -13,6 +14,7 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.test.rest.ESRestTestCase;
import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
import java.util.ArrayList;
@ -62,6 +64,11 @@ public abstract class CommonEqlRestTestCase extends ESRestTestCase {
400, "query malformed, empty clause found"));
}
@BeforeClass
public static void checkForSnapshot() {
assumeTrue("Only works on snapshot builds for now", Build.CURRENT.isSnapshot());
}
@Before
public void setup() throws Exception {
createIndex(defaultValidationIndexName, Settings.EMPTY);

View File

@ -1,3 +1,5 @@
import org.elasticsearch.gradle.info.BuildParams
apply plugin: 'elasticsearch.testclusters'
apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
@ -9,7 +11,9 @@ dependencies {
testClusters.integTest {
testDistribution = 'DEFAULT'
setting 'xpack.eql.enabled', 'true'
if (BuildParams.isSnapshotBuild()) {
setting 'xpack.eql.enabled', 'true'
}
setting 'xpack.license.self_generated.type', 'basic'
setting 'xpack.monitoring.collection.enabled', 'true'
}

View File

@ -7,11 +7,18 @@
package org.elasticsearch.xpack.eql;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
import org.elasticsearch.Build;
import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
import org.junit.BeforeClass;
public class EqlRestIT extends ESClientYamlSuiteTestCase {
@BeforeClass
public static void checkForSnapshot() {
assumeTrue("Only works on snapshot builds for now", Build.CURRENT.isSnapshot());
}
public EqlRestIT(final ClientYamlTestCandidate testCandidate) {
super(testCandidate);
}