diff --git a/modules/analysis-common/build.gradle b/modules/analysis-common/build.gradle index 79be09abae542..77fd095806d10 100644 --- a/modules/analysis-common/build.gradle +++ b/modules/analysis-common/build.gradle @@ -7,8 +7,8 @@ */ import org.elasticsearch.gradle.Version -apply plugin: 'elasticsearch.legacy-yaml-rest-test' -apply plugin: 'elasticsearch.legacy-yaml-rest-compat-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' +apply plugin: 'elasticsearch.yaml-rest-compat-test' apply plugin: 'elasticsearch.internal-cluster-test' esplugin { @@ -23,13 +23,10 @@ restResources { } } -testClusters.configureEach { - module ':modules:reindex' - module ':modules:mapper-extras' -} - dependencies { compileOnly project(':modules:lang-painless:spi') + clusterModules project(':modules:reindex') + clusterModules project(':modules:mapper-extras') } tasks.named("yamlRestTestV7CompatTransform").configure { task -> diff --git a/modules/analysis-common/src/yamlRestTest/java/org/elasticsearch/analysis/common/CommonAnalysisClientYamlTestSuiteIT.java b/modules/analysis-common/src/yamlRestTest/java/org/elasticsearch/analysis/common/CommonAnalysisClientYamlTestSuiteIT.java index 08c6d7d5cd040..9ed086f0a00b9 100644 --- a/modules/analysis-common/src/yamlRestTest/java/org/elasticsearch/analysis/common/CommonAnalysisClientYamlTestSuiteIT.java +++ b/modules/analysis-common/src/yamlRestTest/java/org/elasticsearch/analysis/common/CommonAnalysisClientYamlTestSuiteIT.java @@ -10,8 +10,10 @@ import com.carrotsearch.randomizedtesting.annotations.Name; import com.carrotsearch.randomizedtesting.annotations.ParametersFactory; +import org.elasticsearch.test.cluster.ElasticsearchCluster; import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate; import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase; +import org.junit.ClassRule; public class CommonAnalysisClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase { public CommonAnalysisClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate testCandidate) { @@ -22,4 +24,16 @@ public CommonAnalysisClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate public static Iterable parameters() throws Exception { return ESClientYamlSuiteTestCase.createParameters(); } + + @ClassRule + public static ElasticsearchCluster cluster = ElasticsearchCluster.local() + .module("reindex") + .module("mapper-extras") + .module("analysis-common") + .build(); + + @Override + protected String getTestRestCluster() { + return cluster.getHttpAddresses(); + } }