Fixes #51541 Co-authored-by: Igor Motov <igor@motovs.org>
This commit is contained in:
parent
16ef6a5785
commit
d4f6f38150
|
@ -6,6 +6,7 @@
|
||||||
package org.elasticsearch.test.eql;
|
package org.elasticsearch.test.eql;
|
||||||
|
|
||||||
import org.apache.http.util.EntityUtils;
|
import org.apache.http.util.EntityUtils;
|
||||||
|
import org.elasticsearch.Build;
|
||||||
import org.elasticsearch.client.Request;
|
import org.elasticsearch.client.Request;
|
||||||
import org.elasticsearch.client.Response;
|
import org.elasticsearch.client.Response;
|
||||||
import org.elasticsearch.client.ResponseException;
|
import org.elasticsearch.client.ResponseException;
|
||||||
|
@ -13,6 +14,7 @@ import org.elasticsearch.common.settings.Settings;
|
||||||
import org.elasticsearch.test.rest.ESRestTestCase;
|
import org.elasticsearch.test.rest.ESRestTestCase;
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
|
import org.junit.BeforeClass;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
@ -62,6 +64,11 @@ public abstract class CommonEqlRestTestCase extends ESRestTestCase {
|
||||||
400, "query malformed, empty clause found"));
|
400, "query malformed, empty clause found"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@BeforeClass
|
||||||
|
public static void checkForSnapshot() {
|
||||||
|
assumeTrue("Only works on snapshot builds for now", Build.CURRENT.isSnapshot());
|
||||||
|
}
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setup() throws Exception {
|
public void setup() throws Exception {
|
||||||
createIndex(defaultValidationIndexName, Settings.EMPTY);
|
createIndex(defaultValidationIndexName, Settings.EMPTY);
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import org.elasticsearch.gradle.info.BuildParams
|
||||||
|
|
||||||
apply plugin: 'elasticsearch.testclusters'
|
apply plugin: 'elasticsearch.testclusters'
|
||||||
apply plugin: 'elasticsearch.standalone-rest-test'
|
apply plugin: 'elasticsearch.standalone-rest-test'
|
||||||
apply plugin: 'elasticsearch.rest-test'
|
apply plugin: 'elasticsearch.rest-test'
|
||||||
|
@ -9,7 +11,9 @@ dependencies {
|
||||||
|
|
||||||
testClusters.integTest {
|
testClusters.integTest {
|
||||||
testDistribution = 'DEFAULT'
|
testDistribution = 'DEFAULT'
|
||||||
|
if (BuildParams.isSnapshotBuild()) {
|
||||||
setting 'xpack.eql.enabled', 'true'
|
setting 'xpack.eql.enabled', 'true'
|
||||||
|
}
|
||||||
setting 'xpack.license.self_generated.type', 'basic'
|
setting 'xpack.license.self_generated.type', 'basic'
|
||||||
setting 'xpack.monitoring.collection.enabled', 'true'
|
setting 'xpack.monitoring.collection.enabled', 'true'
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,18 @@
|
||||||
package org.elasticsearch.xpack.eql;
|
package org.elasticsearch.xpack.eql;
|
||||||
|
|
||||||
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
|
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
|
||||||
|
import org.elasticsearch.Build;
|
||||||
import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
|
import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
|
||||||
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
|
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
|
||||||
|
import org.junit.BeforeClass;
|
||||||
|
|
||||||
public class EqlRestIT extends ESClientYamlSuiteTestCase {
|
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) {
|
public EqlRestIT(final ClientYamlTestCandidate testCandidate) {
|
||||||
super(testCandidate);
|
super(testCandidate);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue