Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

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 @@ -9,10 +9,12 @@

import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;

import org.elasticsearch.Build;
import org.elasticsearch.client.Request;
import org.elasticsearch.common.Strings;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
import org.elasticsearch.test.cluster.FeatureFlag;
import org.elasticsearch.test.cluster.local.distribution.DistributionType;
import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
Expand All @@ -21,6 +23,7 @@

import java.io.IOException;
import java.util.List;
import java.util.Locale;
import java.util.Map;

public class InferenceRestIT extends ESClientYamlSuiteTestCase {
Expand All @@ -31,12 +34,17 @@ public class InferenceRestIT extends ESClientYamlSuiteTestCase {
.setting("xpack.security.enabled", "false")
.setting("xpack.security.http.ssl.enabled", "false")
.setting("xpack.license.self_generated.type", "trial")
.feature(FeatureFlag.RERANK_SNIPPETS)
.plugin("inference-service-test")
.distribution(DistributionType.DEFAULT)
.build();

public InferenceRestIT(final ClientYamlTestCandidate testCandidate) {
super(testCandidate);
String testPath = testCandidate.getTestPath();
if (testPath.startsWith("inference/70_text_similarity_rank_retriever") && testPath.toLowerCase(Locale.ROOT).contains("snippet")) {
assumeTrue("Rerank snippets does not work in release builds", Build.current().isSnapshot());
}
}

@Override
Expand Down