Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
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;
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;

Expand Down Expand Up @@ -62,6 +64,11 @@ static class SearchTestConfiguration {
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);
Expand Down
6 changes: 5 additions & 1 deletion x-pack/plugin/eql/qa/rest/build.gradle
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -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'
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down