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;
|
||||
|
||||
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);
|
||||
|
|
|
@ -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'
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue