Skip to content

Commit e023dca

Browse files
authored
REST API compat testing - remove the requirement for default distro (#71119)
Originally much of the REST API compatibility code was to live in x-pack. However, some design changes has removed this requirements and there is no longer a need to explicitly use the default distribution for REST API compatibility testing.
1 parent d205469 commit e023dca

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

buildSrc/src/integTest/groovy/org/elasticsearch/gradle/YamlRestCompatTestPluginFuncTest.groovy

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@ class YamlRestCompatTestPluginFuncTest extends AbstractRestResourcesFuncTest {
7373
7474
// avoids a dependency problem in this test, the distribution in use here is inconsequential to the test
7575
import org.elasticsearch.gradle.testclusters.TestDistribution;
76-
testClusters {
77-
yamlRestCompatTest.setTestDistribution(TestDistribution.INTEG_TEST)
78-
}
7976
8077
dependencies {
8178
yamlRestTestImplementation "junit:junit:4.12"
@@ -198,10 +195,7 @@ class YamlRestCompatTestPluginFuncTest extends AbstractRestResourcesFuncTest {
198195
199196
// avoids a dependency problem in this test, the distribution in use here is inconsequential to the test
200197
import org.elasticsearch.gradle.testclusters.TestDistribution;
201-
testClusters {
202-
yamlRestCompatTest.setTestDistribution(TestDistribution.INTEG_TEST)
203-
}
204-
198+
205199
dependencies {
206200
yamlRestTestImplementation "junit:junit:4.12"
207201
}

buildSrc/src/main/java/org/elasticsearch/gradle/internal/rest/compat/YamlRestCompatTestPlugin.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
import org.elasticsearch.gradle.test.rest.RestResourcesPlugin;
2020
import org.elasticsearch.gradle.test.rest.RestTestUtil;
2121
import org.elasticsearch.gradle.test.rest.YamlRestTestPlugin;
22-
import org.elasticsearch.gradle.testclusters.ElasticsearchCluster;
2322
import org.elasticsearch.gradle.testclusters.TestClustersPlugin;
24-
import org.elasticsearch.gradle.testclusters.TestDistribution;
2523
import org.elasticsearch.gradle.util.GradleUtils;
2624
import org.gradle.api.Plugin;
2725
import org.gradle.api.Project;
@@ -39,7 +37,6 @@
3937
import java.nio.file.Path;
4038
import java.util.Map;
4139

42-
import static org.elasticsearch.gradle.test.rest.RestTestUtil.createTestCluster;
4340
import static org.elasticsearch.gradle.test.rest.RestTestUtil.setupDependencies;
4441

4542
/**
@@ -75,10 +72,6 @@ public void apply(Project project) {
7572
SourceSet yamlTestSourceSet = sourceSets.getByName(YamlRestTestPlugin.SOURCE_SET_NAME);
7673
GradleUtils.extendSourceSet(project, YamlRestTestPlugin.SOURCE_SET_NAME, SOURCE_SET_NAME);
7774

78-
// create the test cluster container, and always use the default distribution
79-
ElasticsearchCluster testCluster = createTestCluster(project, yamlCompatTestSourceSet);
80-
testCluster.setTestDistribution(TestDistribution.DEFAULT);
81-
8275
// copy compatible rest specs
8376
Configuration bwcMinorConfig = project.getConfigurations().create("bwcMinor");
8477
Dependency bwcMinor = project.getDependencies().project(Map.of("path", ":distribution:bwc:minor", "configuration", "checkout"));

0 commit comments

Comments
 (0)