diff --git a/build-tools-internal/build.gradle b/build-tools-internal/build.gradle index 362e5f2d4bc2..b0363dc795eb 100644 --- a/build-tools-internal/build.gradle +++ b/build-tools-internal/build.gradle @@ -159,8 +159,8 @@ gradlePlugin { implementationClass = 'org.elasticsearch.gradle.internal.rest.compat.YamlRestCompatTestPlugin' } yamlRestTest { - id = 'elasticsearch.yaml-rest-test' - implementationClass = 'org.elasticsearch.gradle.internal.test.rest.YamlRestTestPlugin' + id = 'elasticsearch.internal-yaml-rest-test' + implementationClass = 'org.elasticsearch.gradle.internal.test.rest.InternalYamlRestTestPlugin' } } } diff --git a/build-tools-internal/src/integTest/groovy/org/elasticsearch/gradle/internal/test/rest/YamlRestTestPluginFuncTest.groovy b/build-tools-internal/src/integTest/groovy/org/elasticsearch/gradle/internal/test/rest/InternalYamlRestTestPluginFuncTest.groovy similarity index 93% rename from build-tools-internal/src/integTest/groovy/org/elasticsearch/gradle/internal/test/rest/YamlRestTestPluginFuncTest.groovy rename to build-tools-internal/src/integTest/groovy/org/elasticsearch/gradle/internal/test/rest/InternalYamlRestTestPluginFuncTest.groovy index 9cfd51d074be..23554785dde1 100644 --- a/build-tools-internal/src/integTest/groovy/org/elasticsearch/gradle/internal/test/rest/YamlRestTestPluginFuncTest.groovy +++ b/build-tools-internal/src/integTest/groovy/org/elasticsearch/gradle/internal/test/rest/InternalYamlRestTestPluginFuncTest.groovy @@ -11,13 +11,13 @@ package org.elasticsearch.gradle.internal.test.rest import org.elasticsearch.gradle.fixtures.AbstractRestResourcesFuncTest import org.gradle.testkit.runner.TaskOutcome -class YamlRestTestPluginFuncTest extends AbstractRestResourcesFuncTest { +class InternalYamlRestTestPluginFuncTest extends AbstractRestResourcesFuncTest { def "yamlRestTest does nothing when there are no tests"() { given: buildFile << """ plugins { - id 'elasticsearch.yaml-rest-test' + id 'elasticsearch.internal-yaml-rest-test' } """ @@ -34,7 +34,7 @@ class YamlRestTestPluginFuncTest extends AbstractRestResourcesFuncTest { given: internalBuild() buildFile << """ - apply plugin: 'elasticsearch.yaml-rest-test' + apply plugin: 'elasticsearch.internal-yaml-rest-test' dependencies { yamlRestTestImplementation "junit:junit:4.12" diff --git a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/rest/compat/YamlRestCompatTestPlugin.java b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/rest/compat/YamlRestCompatTestPlugin.java index b104d1aa3df7..9a74a3a55e92 100644 --- a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/rest/compat/YamlRestCompatTestPlugin.java +++ b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/rest/compat/YamlRestCompatTestPlugin.java @@ -18,7 +18,7 @@ import org.elasticsearch.gradle.internal.test.rest.CopyRestTestsTask; import org.elasticsearch.gradle.internal.test.rest.RestResourcesExtension; import org.elasticsearch.gradle.internal.test.rest.RestResourcesPlugin; import org.elasticsearch.gradle.internal.test.rest.RestTestUtil; -import org.elasticsearch.gradle.internal.test.rest.YamlRestTestPlugin; +import org.elasticsearch.gradle.internal.test.rest.InternalYamlRestTestPlugin; import org.elasticsearch.gradle.testclusters.TestClustersPlugin; import org.elasticsearch.gradle.util.GradleUtils; import org.gradle.api.Plugin; @@ -63,15 +63,15 @@ public class YamlRestCompatTestPlugin implements Plugin { project.getPluginManager().apply(TestClustersPlugin.class); project.getPluginManager().apply(RestTestBasePlugin.class); project.getPluginManager().apply(RestResourcesPlugin.class); - project.getPluginManager().apply(YamlRestTestPlugin.class); + project.getPluginManager().apply(InternalYamlRestTestPlugin.class); RestResourcesExtension extension = project.getExtensions().getByType(RestResourcesExtension.class); // create source set SourceSetContainer sourceSets = project.getExtensions().getByType(SourceSetContainer.class); SourceSet yamlCompatTestSourceSet = sourceSets.create(SOURCE_SET_NAME); - SourceSet yamlTestSourceSet = sourceSets.getByName(YamlRestTestPlugin.SOURCE_SET_NAME); - GradleUtils.extendSourceSet(project, YamlRestTestPlugin.SOURCE_SET_NAME, SOURCE_SET_NAME); + SourceSet yamlTestSourceSet = sourceSets.getByName(InternalYamlRestTestPlugin.SOURCE_SET_NAME); + GradleUtils.extendSourceSet(project, InternalYamlRestTestPlugin.SOURCE_SET_NAME, SOURCE_SET_NAME); // copy compatible rest specs Configuration bwcMinorConfig = project.getConfigurations().create(BWC_MINOR_CONFIG_NAME); @@ -176,7 +176,7 @@ public class YamlRestCompatTestPlugin implements Plugin { .minus(project.files(originalYamlTestsDir)) ); // run compatibility tests after "normal" tests - testTask.mustRunAfter(project.getTasks().named(YamlRestTestPlugin.SOURCE_SET_NAME)); + testTask.mustRunAfter(project.getTasks().named(InternalYamlRestTestPlugin.SOURCE_SET_NAME)); testTask.onlyIf(t -> isEnabled(project)); }); diff --git a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/test/rest/YamlRestTestPlugin.java b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/test/rest/InternalYamlRestTestPlugin.java similarity index 97% rename from build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/test/rest/YamlRestTestPlugin.java rename to build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/test/rest/InternalYamlRestTestPlugin.java index 5a76543bebca..25ee8a24b979 100644 --- a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/test/rest/YamlRestTestPlugin.java +++ b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/test/rest/InternalYamlRestTestPlugin.java @@ -22,7 +22,7 @@ import static org.elasticsearch.gradle.internal.test.rest.RestTestUtil.setupTest /** * Apply this plugin to run the YAML based REST tests. */ -public class YamlRestTestPlugin implements Plugin { +public class InternalYamlRestTestPlugin implements Plugin { public static final String SOURCE_SET_NAME = "yamlRestTest"; diff --git a/build-tools/build.gradle b/build-tools/build.gradle index 6743306dafe2..1da2a31390d4 100644 --- a/build-tools/build.gradle +++ b/build-tools/build.gradle @@ -58,6 +58,10 @@ gradlePlugin { id = 'elasticsearch.test-gradle-policy' implementationClass = 'org.elasticsearch.gradle.test.GradleTestPolicySetupPlugin' } + yamlTests { + id = 'elasticsearch.yaml-rest-test' + implementationClass = 'org.elasticsearch.gradle.test.YamlRestTestPlugin' + } } } diff --git a/build-tools/src/integTest/groovy/org/elasticsearch/gradle/test/YamlRestTestPluginFuncTest.groovy b/build-tools/src/integTest/groovy/org/elasticsearch/gradle/test/YamlRestTestPluginFuncTest.groovy new file mode 100644 index 000000000000..af3d7f4e71c9 --- /dev/null +++ b/build-tools/src/integTest/groovy/org/elasticsearch/gradle/test/YamlRestTestPluginFuncTest.groovy @@ -0,0 +1,64 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +package org.elasticsearch.gradle.test + +import org.elasticsearch.gradle.VersionProperties +import org.elasticsearch.gradle.fixtures.AbstractGradleFuncTest +import org.gradle.testkit.runner.TaskOutcome + +class YamlRestTestPluginFuncTest extends AbstractGradleFuncTest { + + def "declares default dependencies"() { + given: + buildFile << """ + plugins { + id 'elasticsearch.yaml-rest-test' + } + """ + + when: + def result = gradleRunner("dependencies").build() + + then: + result.output.contains(""" +restTestSpecs +\\--- org.elasticsearch:rest-api-spec:${VersionProperties.elasticsearch} FAILED +""") + result.output.contains(""" +yamlRestTestImplementation - Implementation only dependencies for source set 'yaml rest test'. (n) +\\--- org.elasticsearch.test:framework:8.0.0-SNAPSHOT (n) +""") + } + + def "yamlRestTest does nothing when there are no tests"() { + given: + buildFile << """ + plugins { + id 'elasticsearch.yaml-rest-test' + } + + repositories { + mavenCentral() + } + + dependencies { + yamlRestTestImplementation "org.elasticsearch.test:framework:7.14.0" + restTestSpecs "org.elasticsearch:rest-api-spec:7.14.0" + } + """ + + when: + def result = gradleRunner("yamlRestTest").build() + then: + result.task(':compileYamlRestTestJava').outcome == TaskOutcome.NO_SOURCE + result.task(':processYamlRestTestResources').outcome == TaskOutcome.NO_SOURCE + result.task(':yamlRestTest').outcome == TaskOutcome.NO_SOURCE + } + +} \ No newline at end of file diff --git a/build-tools/src/main/java/org/elasticsearch/gradle/plugin/PluginBuildPlugin.java b/build-tools/src/main/java/org/elasticsearch/gradle/plugin/PluginBuildPlugin.java index 54674d5476f9..fa7cc4d5beb2 100644 --- a/build-tools/src/main/java/org/elasticsearch/gradle/plugin/PluginBuildPlugin.java +++ b/build-tools/src/main/java/org/elasticsearch/gradle/plugin/PluginBuildPlugin.java @@ -54,6 +54,9 @@ import java.util.stream.Collectors; * Encapsulates build configuration for an Elasticsearch plugin. */ public class PluginBuildPlugin implements Plugin { + + public static final String BUNDLE_PLUGIN_TASK_NAME = "bundlePlugin"; + @Override public void apply(final Project project) { project.getPluginManager().apply(JavaPlugin.class); @@ -124,7 +127,7 @@ public class PluginBuildPlugin implements Plugin { project.getTasks().register("run", RunTask.class, runTask -> { runTask.useCluster(runCluster); - runTask.dependsOn(project.getTasks().named("bundlePlugin")); + runTask.dependsOn(project.getTasks().named(BUNDLE_PLUGIN_TASK_NAME)); }); } diff --git a/build-tools/src/main/java/org/elasticsearch/gradle/test/YamlRestTestPlugin.java b/build-tools/src/main/java/org/elasticsearch/gradle/test/YamlRestTestPlugin.java new file mode 100644 index 000000000000..1ce03787a075 --- /dev/null +++ b/build-tools/src/main/java/org/elasticsearch/gradle/test/YamlRestTestPlugin.java @@ -0,0 +1,124 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +package org.elasticsearch.gradle.test; + +import org.elasticsearch.gradle.VersionProperties; +import org.elasticsearch.gradle.plugin.PluginBuildPlugin; +import org.elasticsearch.gradle.testclusters.ElasticsearchCluster; +import org.elasticsearch.gradle.testclusters.StandaloneRestIntegTestTask; +import org.elasticsearch.gradle.testclusters.TestClustersPlugin; +import org.elasticsearch.gradle.transform.UnzipTransform; +import org.gradle.api.Action; +import org.gradle.api.NamedDomainObjectContainer; +import org.gradle.api.Plugin; +import org.gradle.api.Project; +import org.gradle.api.Task; +import org.gradle.api.artifacts.Configuration; +import org.gradle.api.artifacts.ConfigurationContainer; +import org.gradle.api.artifacts.dsl.DependencyHandler; +import org.gradle.api.artifacts.type.ArtifactTypeDefinition; +import org.gradle.api.attributes.Attribute; +import org.gradle.api.internal.artifacts.ArtifactAttributes; +import org.gradle.api.plugins.JavaBasePlugin; +import org.gradle.api.tasks.Copy; +import org.gradle.api.tasks.SourceSet; +import org.gradle.api.tasks.SourceSetContainer; +import org.gradle.api.tasks.TaskProvider; +import org.gradle.api.tasks.bundling.Zip; + +import java.io.File; + +import static org.elasticsearch.gradle.plugin.PluginBuildPlugin.BUNDLE_PLUGIN_TASK_NAME; + +public class YamlRestTestPlugin implements Plugin { + + public static final String REST_TEST_SPECS_CONFIGURATION_NAME = "restTestSpecs"; + public static final String YAML_REST_TEST = "yamlRestTest"; + + @Override + public void apply(Project project) { + project.getPluginManager().apply(GradleTestPolicySetupPlugin.class); + project.getPluginManager().apply(TestClustersPlugin.class); + project.getPluginManager().apply(JavaBasePlugin.class); + + Attribute restAttribute = Attribute.of("restSpecs", Boolean.class); + project.getDependencies().getAttributesSchema().attribute(restAttribute); + project.getDependencies().getArtifactTypes().maybeCreate(ArtifactTypeDefinition.JAR_TYPE); + project.getDependencies().registerTransform(UnzipTransform.class, transformSpec -> { + transformSpec.getFrom() + .attribute(ArtifactAttributes.ARTIFACT_FORMAT, ArtifactTypeDefinition.JAR_TYPE) + .attribute(restAttribute, true); + transformSpec.getTo() + .attribute(ArtifactAttributes.ARTIFACT_FORMAT, ArtifactTypeDefinition.DIRECTORY_TYPE) + .attribute(restAttribute, true); + }); + + ConfigurationContainer configurations = project.getConfigurations(); + Configuration restTestSpecs = configurations.create(REST_TEST_SPECS_CONFIGURATION_NAME); + restTestSpecs.getAttributes().attribute(ArtifactAttributes.ARTIFACT_FORMAT, ArtifactTypeDefinition.DIRECTORY_TYPE); + restTestSpecs.getAttributes().attribute(restAttribute, true); + + TaskProvider copyRestTestSpecs = project.getTasks().register("copyRestTestSpecs", Copy.class, t -> { + t.from(restTestSpecs); + t.into(new File(project.getBuildDir(), "restResources/restspec")); + }); + + var sourceSets = project.getExtensions().getByType(SourceSetContainer.class); + var testSourceSet = sourceSets.maybeCreate(YAML_REST_TEST); + NamedDomainObjectContainer testClusters = (NamedDomainObjectContainer) project + .getExtensions() + .getByName(TestClustersPlugin.EXTENSION_NAME); + + testSourceSet.getOutput().dir(copyRestTestSpecs.map(Task::getOutputs)); + Configuration yamlRestTestImplementation = configurations.getByName(testSourceSet.getImplementationConfigurationName()); + setupDefaultDependencies(project.getDependencies(), restTestSpecs, yamlRestTestImplementation); + var cluster = testClusters.maybeCreate(YAML_REST_TEST); + TaskProvider yamlRestTestTask = setupTestTask(project, testSourceSet, cluster); + project.getPlugins().withType(PluginBuildPlugin.class, p -> { + TaskProvider bundle = project.getTasks().withType(Zip.class).named(BUNDLE_PLUGIN_TASK_NAME); + cluster.plugin(bundle.flatMap(Zip::getArchiveFile)); + yamlRestTestTask.configure(t -> t.dependsOn(bundle)); + }); + } + + private static void setupDefaultDependencies( + DependencyHandler dependencyHandler, + Configuration restTestSpecs, + Configuration yamlRestTestImplementation + ) { + String elasticsearchVersion = VersionProperties.getElasticsearch(); + yamlRestTestImplementation.defaultDependencies( + deps -> deps.add(dependencyHandler.create("org.elasticsearch.test:framework:" + elasticsearchVersion)) + ); + + restTestSpecs.defaultDependencies( + deps -> deps.add(dependencyHandler.create("org.elasticsearch:rest-api-spec:" + elasticsearchVersion)) + ); + } + + private TaskProvider setupTestTask( + Project project, + SourceSet testSourceSet, + ElasticsearchCluster cluster + ) { + return project.getTasks().register("yamlRestTest", StandaloneRestIntegTestTask.class, task -> { + task.useCluster(cluster); + task.setTestClassesDirs(testSourceSet.getOutput().getClassesDirs()); + task.setClasspath(testSourceSet.getRuntimeClasspath()); + + var nonInputProperties = new SystemPropertyCommandLineArgumentProvider(); + nonInputProperties.systemProperty("tests.rest.cluster", () -> String.join(",", cluster.getAllHttpSocketURI())); + nonInputProperties.systemProperty("tests.cluster", () -> String.join(",", cluster.getAllTransportPortURI())); + nonInputProperties.systemProperty("tests.clustername", () -> cluster.getName()); + task.getJvmArgumentProviders().add(nonInputProperties); + task.systemProperty("tests.rest.load_packaged", Boolean.FALSE.toString()); + }); + } + +} diff --git a/modules/aggs-matrix-stats/build.gradle b/modules/aggs-matrix-stats/build.gradle index 080c9af25194..fcab80d9891e 100644 --- a/modules/aggs-matrix-stats/build.gradle +++ b/modules/aggs-matrix-stats/build.gradle @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' esplugin { diff --git a/modules/analysis-common/build.gradle b/modules/analysis-common/build.gradle index 02e715c03bca..4c39e668c172 100644 --- a/modules/analysis-common/build.gradle +++ b/modules/analysis-common/build.gradle @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' apply plugin: 'elasticsearch.internal-cluster-test' diff --git a/modules/geo/build.gradle b/modules/geo/build.gradle index 1c8537df6fc2..66b203084e49 100644 --- a/modules/geo/build.gradle +++ b/modules/geo/build.gradle @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' import org.elasticsearch.gradle.internal.info.BuildParams diff --git a/modules/ingest-common/build.gradle b/modules/ingest-common/build.gradle index af28ddec0cd7..036cde58f9de 100644 --- a/modules/ingest-common/build.gradle +++ b/modules/ingest-common/build.gradle @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' apply plugin: 'elasticsearch.internal-cluster-test' diff --git a/modules/ingest-geoip/build.gradle b/modules/ingest-geoip/build.gradle index cf59994ab8d2..b2d8689e5c2e 100644 --- a/modules/ingest-geoip/build.gradle +++ b/modules/ingest-geoip/build.gradle @@ -8,7 +8,7 @@ import org.apache.tools.ant.taskdefs.condition.Os -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' apply plugin: 'elasticsearch.internal-cluster-test' diff --git a/modules/ingest-user-agent/build.gradle b/modules/ingest-user-agent/build.gradle index 1518b1d64a08..c14f92bfff05 100644 --- a/modules/ingest-user-agent/build.gradle +++ b/modules/ingest-user-agent/build.gradle @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' esplugin { diff --git a/modules/lang-expression/build.gradle b/modules/lang-expression/build.gradle index a73c929be0d4..b177abfc6e63 100644 --- a/modules/lang-expression/build.gradle +++ b/modules/lang-expression/build.gradle @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' apply plugin: 'elasticsearch.internal-cluster-test' diff --git a/modules/lang-mustache/build.gradle b/modules/lang-mustache/build.gradle index a4e328ac4608..fd80aece89df 100644 --- a/modules/lang-mustache/build.gradle +++ b/modules/lang-mustache/build.gradle @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' apply plugin: 'elasticsearch.java-rest-test' apply plugin: 'elasticsearch.internal-cluster-test' diff --git a/modules/lang-painless/build.gradle b/modules/lang-painless/build.gradle index 278f95a020e9..e7251dd7ea0c 100644 --- a/modules/lang-painless/build.gradle +++ b/modules/lang-painless/build.gradle @@ -8,7 +8,7 @@ import org.elasticsearch.gradle.testclusters.DefaultTestClustersTask; apply plugin: 'elasticsearch.validate-rest-spec' -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' esplugin { diff --git a/modules/mapper-extras/build.gradle b/modules/mapper-extras/build.gradle index f518204d2f05..d63df5a68593 100644 --- a/modules/mapper-extras/build.gradle +++ b/modules/mapper-extras/build.gradle @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' apply plugin: 'elasticsearch.internal-cluster-test' diff --git a/modules/parent-join/build.gradle b/modules/parent-join/build.gradle index 0b3099dc80a6..088f0c068ef5 100644 --- a/modules/parent-join/build.gradle +++ b/modules/parent-join/build.gradle @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' apply plugin: 'elasticsearch.internal-cluster-test' diff --git a/modules/percolator/build.gradle b/modules/percolator/build.gradle index 81936f44a7ec..69c30fadec50 100644 --- a/modules/percolator/build.gradle +++ b/modules/percolator/build.gradle @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' apply plugin: 'elasticsearch.internal-cluster-test' diff --git a/modules/rank-eval/build.gradle b/modules/rank-eval/build.gradle index 308d859931da..a0a51095c9c8 100644 --- a/modules/rank-eval/build.gradle +++ b/modules/rank-eval/build.gradle @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' apply plugin: 'elasticsearch.internal-cluster-test' diff --git a/modules/reindex/build.gradle b/modules/reindex/build.gradle index 277fee4aa658..37b70c340ab7 100644 --- a/modules/reindex/build.gradle +++ b/modules/reindex/build.gradle @@ -14,7 +14,7 @@ import org.elasticsearch.gradle.internal.test.AntFixture apply plugin: 'elasticsearch.test-with-dependencies' apply plugin: 'elasticsearch.jdk-download' -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.java-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' apply plugin: 'elasticsearch.internal-cluster-test' diff --git a/modules/repository-url/build.gradle b/modules/repository-url/build.gradle index 0245a3ea69b9..a19cae51e898 100644 --- a/modules/repository-url/build.gradle +++ b/modules/repository-url/build.gradle @@ -8,7 +8,7 @@ import org.elasticsearch.gradle.PropertyNormalization -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' apply plugin: 'elasticsearch.internal-cluster-test' apply plugin: 'elasticsearch.test.fixtures' diff --git a/modules/runtime-fields-common/build.gradle b/modules/runtime-fields-common/build.gradle index 83c4e7410a4c..54076aaecdf8 100644 --- a/modules/runtime-fields-common/build.gradle +++ b/modules/runtime-fields-common/build.gradle @@ -7,7 +7,7 @@ */ apply plugin: 'elasticsearch.validate-rest-spec' -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' esplugin { diff --git a/modules/transport-netty4/build.gradle b/modules/transport-netty4/build.gradle index 9cd1db75e86d..4eb68a6e4cf1 100644 --- a/modules/transport-netty4/build.gradle +++ b/modules/transport-netty4/build.gradle @@ -12,7 +12,7 @@ import org.elasticsearch.gradle.internal.test.RestIntegTestTask import org.elasticsearch.gradle.internal.test.rest.JavaRestTestPlugin import org.elasticsearch.gradle.internal.test.InternalClusterTestPlugin -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' apply plugin: 'elasticsearch.java-rest-test' apply plugin: 'elasticsearch.internal-cluster-test' diff --git a/plugins/analysis-icu/build.gradle b/plugins/analysis-icu/build.gradle index e2926ae0cf7a..babff8e86ee5 100644 --- a/plugins/analysis-icu/build.gradle +++ b/plugins/analysis-icu/build.gradle @@ -7,7 +7,7 @@ import de.thetaphi.forbiddenapis.gradle.CheckForbiddenApis * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' apply plugin: 'elasticsearch.internal-cluster-test' diff --git a/plugins/analysis-kuromoji/build.gradle b/plugins/analysis-kuromoji/build.gradle index 801d6e323896..0b3beb8ab5db 100644 --- a/plugins/analysis-kuromoji/build.gradle +++ b/plugins/analysis-kuromoji/build.gradle @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' esplugin { diff --git a/plugins/analysis-nori/build.gradle b/plugins/analysis-nori/build.gradle index 7c0604b56813..099e62079514 100644 --- a/plugins/analysis-nori/build.gradle +++ b/plugins/analysis-nori/build.gradle @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' esplugin { diff --git a/plugins/analysis-phonetic/build.gradle b/plugins/analysis-phonetic/build.gradle index bd8af3ff93a1..89ff6f900c80 100644 --- a/plugins/analysis-phonetic/build.gradle +++ b/plugins/analysis-phonetic/build.gradle @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' esplugin { diff --git a/plugins/analysis-smartcn/build.gradle b/plugins/analysis-smartcn/build.gradle index e997c81b3fc8..3a3bd3012fd8 100644 --- a/plugins/analysis-smartcn/build.gradle +++ b/plugins/analysis-smartcn/build.gradle @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' esplugin { diff --git a/plugins/analysis-stempel/build.gradle b/plugins/analysis-stempel/build.gradle index bc5e973b9d98..3b1eb7623f94 100644 --- a/plugins/analysis-stempel/build.gradle +++ b/plugins/analysis-stempel/build.gradle @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' esplugin { diff --git a/plugins/analysis-ukrainian/build.gradle b/plugins/analysis-ukrainian/build.gradle index 3c869e9195b1..2a059bd746c9 100644 --- a/plugins/analysis-ukrainian/build.gradle +++ b/plugins/analysis-ukrainian/build.gradle @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' esplugin { diff --git a/plugins/discovery-azure-classic/build.gradle b/plugins/discovery-azure-classic/build.gradle index 3101b0b343c5..a97c9d8e5a11 100644 --- a/plugins/discovery-azure-classic/build.gradle +++ b/plugins/discovery-azure-classic/build.gradle @@ -8,7 +8,7 @@ import org.elasticsearch.gradle.internal.info.BuildParams * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.internal-cluster-test' esplugin { diff --git a/plugins/discovery-ec2/build.gradle b/plugins/discovery-ec2/build.gradle index 6eac2f760f65..0a8f29995585 100644 --- a/plugins/discovery-ec2/build.gradle +++ b/plugins/discovery-ec2/build.gradle @@ -7,7 +7,7 @@ import org.elasticsearch.gradle.internal.info.BuildParams * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.internal-cluster-test' esplugin { diff --git a/plugins/discovery-ec2/qa/amazon-ec2/build.gradle b/plugins/discovery-ec2/qa/amazon-ec2/build.gradle index 5d87ad59fef1..e8afba63970c 100644 --- a/plugins/discovery-ec2/qa/amazon-ec2/build.gradle +++ b/plugins/discovery-ec2/qa/amazon-ec2/build.gradle @@ -10,11 +10,11 @@ import org.apache.tools.ant.filters.ReplaceTokens import org.elasticsearch.gradle.internal.info.BuildParams import org.elasticsearch.gradle.internal.test.AntFixture import org.elasticsearch.gradle.internal.test.RestIntegTestTask -import org.elasticsearch.gradle.internal.test.rest.YamlRestTestPlugin +import org.elasticsearch.gradle.internal.test.rest.InternalYamlRestTestPlugin import static org.elasticsearch.gradle.PropertyNormalization.IGNORE_VALUE -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' dependencies { yamlRestTestImplementation project(':plugins:discovery-ec2') @@ -62,7 +62,7 @@ tasks.named("yamlRestTest").configure { enabled = false } def yamlRestTestTask = tasks.register("yamlRestTest${action}", RestIntegTestTask) { dependsOn fixture SourceSetContainer sourceSets = project.getExtensions().getByType(SourceSetContainer.class); - SourceSet yamlRestTestSourceSet = sourceSets.getByName(YamlRestTestPlugin.SOURCE_SET_NAME) + SourceSet yamlRestTestSourceSet = sourceSets.getByName(InternalYamlRestTestPlugin.SOURCE_SET_NAME) testClassesDirs = yamlRestTestSourceSet.getOutput().getClassesDirs() classpath = yamlRestTestSourceSet.getRuntimeClasspath() } diff --git a/plugins/discovery-gce/build.gradle b/plugins/discovery-gce/build.gradle index 738929e6f2b2..b936669d4ee2 100644 --- a/plugins/discovery-gce/build.gradle +++ b/plugins/discovery-gce/build.gradle @@ -1,4 +1,4 @@ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.internal-cluster-test' esplugin { diff --git a/plugins/discovery-gce/qa/gce/build.gradle b/plugins/discovery-gce/qa/gce/build.gradle index 86fbf3096346..c2cd26c2e928 100644 --- a/plugins/discovery-gce/qa/gce/build.gradle +++ b/plugins/discovery-gce/qa/gce/build.gradle @@ -13,7 +13,7 @@ import org.elasticsearch.gradle.internal.test.AntFixture import static org.elasticsearch.gradle.PropertyNormalization.IGNORE_VALUE -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' final int gceNumberOfNodes = 3 diff --git a/plugins/examples/build.gradle b/plugins/examples/build.gradle index e3bbc6cb22b3..31bcccd9c5ec 100644 --- a/plugins/examples/build.gradle +++ b/plugins/examples/build.gradle @@ -1,14 +1,24 @@ import org.elasticsearch.gradle.internal.info.BuildParams // Subprojects aren't published so do not assemble -subprojects { - project.tasks.matching { it.name.equals('assemble') }.configureEach { +subprojects { p -> + p.tasks.matching { it.name.equals('assemble') }.configureEach { enabled = false } if (BuildParams.inFipsJvm) { - project.tasks.configureEach { + p.tasks.configureEach { enabled = false } } + + // configure project dependencies for yaml rest test plugin. + // plugin defaults to external available artifacts + p.getPluginManager().withPlugin("elasticsearch.yaml-rest-test", new Action() { + @Override + void execute(AppliedPlugin appliedPlugin) { + p.dependencies.add("yamlRestTestImplementation", project(":test:framework")) + p.dependencies.add("restTestSpecs", p.dependencies.project(path:':rest-api-spec', configuration:'basicRestSpecs')) + } + }) } configure(project('painless-whitelist')) { diff --git a/plugins/ingest-attachment/build.gradle b/plugins/ingest-attachment/build.gradle index 0f5f7a403178..bd138a42df2f 100644 --- a/plugins/ingest-attachment/build.gradle +++ b/plugins/ingest-attachment/build.gradle @@ -7,7 +7,7 @@ import org.elasticsearch.gradle.internal.info.BuildParams * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' esplugin { diff --git a/plugins/mapper-annotated-text/build.gradle b/plugins/mapper-annotated-text/build.gradle index 3bf05291ef2c..de3c0b1c6fb3 100644 --- a/plugins/mapper-annotated-text/build.gradle +++ b/plugins/mapper-annotated-text/build.gradle @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' apply plugin: 'elasticsearch.internal-cluster-test' diff --git a/plugins/mapper-murmur3/build.gradle b/plugins/mapper-murmur3/build.gradle index 8bfdff8fd913..81df70e3855b 100644 --- a/plugins/mapper-murmur3/build.gradle +++ b/plugins/mapper-murmur3/build.gradle @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' esplugin { diff --git a/plugins/mapper-size/build.gradle b/plugins/mapper-size/build.gradle index 12176fff28c5..ca4738335d0c 100644 --- a/plugins/mapper-size/build.gradle +++ b/plugins/mapper-size/build.gradle @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' apply plugin: 'elasticsearch.internal-cluster-test' diff --git a/plugins/repository-azure/build.gradle b/plugins/repository-azure/build.gradle index 82459bd6f78c..b5f7b4d49831 100644 --- a/plugins/repository-azure/build.gradle +++ b/plugins/repository-azure/build.gradle @@ -13,7 +13,7 @@ import static org.elasticsearch.gradle.PropertyNormalization.IGNORE_VALUE * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.internal-cluster-test' apply plugin: 'elasticsearch.internal-test-artifact-base' diff --git a/plugins/repository-gcs/build.gradle b/plugins/repository-gcs/build.gradle index b64d911d0663..6bd792096b02 100644 --- a/plugins/repository-gcs/build.gradle +++ b/plugins/repository-gcs/build.gradle @@ -1,7 +1,7 @@ import org.apache.tools.ant.filters.ReplaceTokens import org.elasticsearch.gradle.internal.info.BuildParams import org.elasticsearch.gradle.internal.test.RestIntegTestTask -import org.elasticsearch.gradle.internal.test.rest.YamlRestTestPlugin +import org.elasticsearch.gradle.internal.test.rest.InternalYamlRestTestPlugin import org.elasticsearch.gradle.internal.test.InternalClusterTestPlugin import java.nio.file.Files @@ -16,7 +16,7 @@ import static org.elasticsearch.gradle.PropertyNormalization.IGNORE_VALUE * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.internal-cluster-test' apply plugin: 'elasticsearch.internal-test-artifact-base' @@ -286,7 +286,7 @@ def largeBlobYamlRestTest = tasks.register("largeBlobYamlRestTest", RestIntegTes dependsOn "createServiceAccountFile" } SourceSetContainer sourceSets = project.getExtensions().getByType(SourceSetContainer.class); - SourceSet yamlRestTestSourceSet = sourceSets.getByName(YamlRestTestPlugin.SOURCE_SET_NAME) + SourceSet yamlRestTestSourceSet = sourceSets.getByName(InternalYamlRestTestPlugin.SOURCE_SET_NAME) setTestClassesDirs(yamlRestTestSourceSet.getOutput().getClassesDirs()) setClasspath(yamlRestTestSourceSet.getRuntimeClasspath()) @@ -339,7 +339,7 @@ if (useFixture) { tasks.register("yamlRestTestApplicationDefaultCredentials", RestIntegTestTask.class) { dependsOn('bundlePlugin') SourceSetContainer sourceSets = project.getExtensions().getByType(SourceSetContainer.class); - SourceSet yamlRestTestSourceSet = sourceSets.getByName(YamlRestTestPlugin.SOURCE_SET_NAME) + SourceSet yamlRestTestSourceSet = sourceSets.getByName(InternalYamlRestTestPlugin.SOURCE_SET_NAME) setTestClassesDirs(yamlRestTestSourceSet.getOutput().getClassesDirs()) setClasspath(yamlRestTestSourceSet.getRuntimeClasspath()) } diff --git a/plugins/repository-s3/build.gradle b/plugins/repository-s3/build.gradle index 0a83463d21df..0c98d919f682 100644 --- a/plugins/repository-s3/build.gradle +++ b/plugins/repository-s3/build.gradle @@ -1,7 +1,7 @@ import org.apache.tools.ant.filters.ReplaceTokens import org.elasticsearch.gradle.internal.info.BuildParams import org.elasticsearch.gradle.internal.test.RestIntegTestTask -import org.elasticsearch.gradle.internal.test.rest.YamlRestTestPlugin +import org.elasticsearch.gradle.internal.test.rest.InternalYamlRestTestPlugin import org.elasticsearch.gradle.internal.test.InternalClusterTestPlugin import static org.elasticsearch.gradle.PropertyNormalization.IGNORE_VALUE @@ -13,7 +13,7 @@ import static org.elasticsearch.gradle.PropertyNormalization.IGNORE_VALUE * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.internal-cluster-test' apply plugin: 'elasticsearch.internal-test-artifact-base' @@ -218,7 +218,7 @@ if (useFixture) { description = "Runs REST tests using the Minio repository." dependsOn tasks.named("bundlePlugin") SourceSetContainer sourceSets = project.getExtensions().getByType(SourceSetContainer.class); - SourceSet yamlRestTestSourceSet = sourceSets.getByName(YamlRestTestPlugin.SOURCE_SET_NAME) + SourceSet yamlRestTestSourceSet = sourceSets.getByName(InternalYamlRestTestPlugin.SOURCE_SET_NAME) setTestClassesDirs(yamlRestTestSourceSet.getOutput().getClassesDirs()) setClasspath(yamlRestTestSourceSet.getRuntimeClasspath()) @@ -246,7 +246,7 @@ if (useFixture) { description = "Runs tests using the ECS repository." dependsOn('bundlePlugin') SourceSetContainer sourceSets = project.getExtensions().getByType(SourceSetContainer.class); - SourceSet yamlRestTestSourceSet = sourceSets.getByName(YamlRestTestPlugin.SOURCE_SET_NAME) + SourceSet yamlRestTestSourceSet = sourceSets.getByName(InternalYamlRestTestPlugin.SOURCE_SET_NAME) setTestClassesDirs(yamlRestTestSourceSet.getOutput().getClassesDirs()) setClasspath(yamlRestTestSourceSet.getRuntimeClasspath()) systemProperty 'tests.rest.blacklist', [ diff --git a/plugins/store-smb/build.gradle b/plugins/store-smb/build.gradle index 728e9642d9c2..91c7dcadf022 100644 --- a/plugins/store-smb/build.gradle +++ b/plugins/store-smb/build.gradle @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.internal-cluster-test' esplugin { diff --git a/rest-api-spec/build.gradle b/rest-api-spec/build.gradle index a126408b5dbe..7558b033b813 100644 --- a/rest-api-spec/build.gradle +++ b/rest-api-spec/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'elasticsearch.build' apply plugin: 'elasticsearch.publish' apply plugin: 'elasticsearch.rest-resources' apply plugin: 'elasticsearch.validate-rest-spec' -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' restResources { @@ -17,7 +17,18 @@ restResources { ext.projectLicenses.set(['The Apache Software License, Version 2.0': 'http://www.apache.org/licenses/LICENSE-2.0']) ext.licenseFile = rootProject.file('licenses/APACHE-LICENSE-2.0.txt') +configurations { + // configuration to make use by external yaml rest test plugin in our examples + // easy and efficient + basicRestSpecs { + attributes { + attribute(org.gradle.api.internal.artifacts.ArtifactAttributes.ARTIFACT_FORMAT, ArtifactTypeDefinition.DIRECTORY_TYPE) + } + } +} + artifacts { + basicRestSpecs(new File(projectDir, "src/main/resources")) restSpecs(new File(projectDir, "src/main/resources/rest-api-spec/api")) restTests(new File(projectDir, "src/yamlRestTest/resources/rest-api-spec/test")) } diff --git a/test/external-modules/build.gradle b/test/external-modules/build.gradle index 396ecf5eb618..68408b1f585d 100644 --- a/test/external-modules/build.gradle +++ b/test/external-modules/build.gradle @@ -3,7 +3,7 @@ import org.elasticsearch.gradle.internal.info.BuildParams; subprojects { apply plugin: 'elasticsearch.internal-es-plugin' - apply plugin: 'elasticsearch.yaml-rest-test' + apply plugin: 'elasticsearch.internal-yaml-rest-test' esplugin { name it.name diff --git a/x-pack/plugin/async-search/qa/rest/build.gradle b/x-pack/plugin/async-search/qa/rest/build.gradle index 63e2e3fea312..545925f34ef5 100644 --- a/x-pack/plugin/async-search/qa/rest/build.gradle +++ b/x-pack/plugin/async-search/qa/rest/build.gradle @@ -1,7 +1,7 @@ import org.elasticsearch.gradle.internal.info.BuildParams apply plugin: 'elasticsearch.internal-es-plugin' -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' esplugin { diff --git a/x-pack/plugin/autoscaling/qa/rest/build.gradle b/x-pack/plugin/autoscaling/qa/rest/build.gradle index e95ad8846905..22bd3b6f0395 100644 --- a/x-pack/plugin/autoscaling/qa/rest/build.gradle +++ b/x-pack/plugin/autoscaling/qa/rest/build.gradle @@ -1,6 +1,6 @@ import org.elasticsearch.gradle.internal.info.BuildParams -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' dependencies { diff --git a/x-pack/plugin/build.gradle b/x-pack/plugin/build.gradle index b5ebc0e18c85..fff40db3823f 100644 --- a/x-pack/plugin/build.gradle +++ b/x-pack/plugin/build.gradle @@ -2,7 +2,7 @@ import org.elasticsearch.gradle.internal.info.BuildParams import org.elasticsearch.gradle.util.GradleUtils import org.elasticsearch.gradle.internal.test.RestIntegTestTask -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' apply plugin: 'elasticsearch.validate-rest-spec' apply plugin: 'elasticsearch.internal-test-artifact' diff --git a/x-pack/plugin/ccr/qa/rest/build.gradle b/x-pack/plugin/ccr/qa/rest/build.gradle index b96bf48d8854..bb9d390229de 100644 --- a/x-pack/plugin/ccr/qa/rest/build.gradle +++ b/x-pack/plugin/ccr/qa/rest/build.gradle @@ -1,4 +1,4 @@ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' restResources { diff --git a/x-pack/plugin/core/build.gradle b/x-pack/plugin/core/build.gradle index 9b8a1887f2dc..7504cae334aa 100644 --- a/x-pack/plugin/core/build.gradle +++ b/x-pack/plugin/core/build.gradle @@ -6,7 +6,7 @@ import java.nio.file.Paths apply plugin: 'elasticsearch.internal-es-plugin' apply plugin: 'elasticsearch.publish' apply plugin: 'elasticsearch.internal-cluster-test' -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' apply plugin: 'elasticsearch.internal-test-artifact' diff --git a/x-pack/plugin/data-streams/qa/rest/build.gradle b/x-pack/plugin/data-streams/qa/rest/build.gradle index 9ef638db9e3e..f36367babb5e 100644 --- a/x-pack/plugin/data-streams/qa/rest/build.gradle +++ b/x-pack/plugin/data-streams/qa/rest/build.gradle @@ -1,7 +1,7 @@ import org.elasticsearch.gradle.internal.info.BuildParams apply plugin: 'elasticsearch.java-rest-test' -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' restResources { diff --git a/x-pack/plugin/enrich/qa/rest/build.gradle b/x-pack/plugin/enrich/qa/rest/build.gradle index ca3e1409a914..38292cd80715 100644 --- a/x-pack/plugin/enrich/qa/rest/build.gradle +++ b/x-pack/plugin/enrich/qa/rest/build.gradle @@ -1,5 +1,5 @@ apply plugin: 'elasticsearch.java-rest-test' -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' import org.elasticsearch.gradle.internal.info.BuildParams diff --git a/x-pack/plugin/eql/qa/rest/build.gradle b/x-pack/plugin/eql/qa/rest/build.gradle index f86a868e87e1..7ee4fc92b3ef 100644 --- a/x-pack/plugin/eql/qa/rest/build.gradle +++ b/x-pack/plugin/eql/qa/rest/build.gradle @@ -1,5 +1,5 @@ apply plugin: 'elasticsearch.java-rest-test' -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' import org.elasticsearch.gradle.internal.info.BuildParams diff --git a/x-pack/plugin/fleet/qa/rest/build.gradle b/x-pack/plugin/fleet/qa/rest/build.gradle index b4d566a54bfd..a5e8c02f22be 100644 --- a/x-pack/plugin/fleet/qa/rest/build.gradle +++ b/x-pack/plugin/fleet/qa/rest/build.gradle @@ -1,6 +1,6 @@ import org.elasticsearch.gradle.internal.info.BuildParams -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' dependencies { yamlRestTestImplementation(testArtifact(project(xpackModule('core')))) diff --git a/x-pack/plugin/graph/qa/with-security/build.gradle b/x-pack/plugin/graph/qa/with-security/build.gradle index 8109160f1950..065ac82c8efb 100644 --- a/x-pack/plugin/graph/qa/with-security/build.gradle +++ b/x-pack/plugin/graph/qa/with-security/build.gradle @@ -1,4 +1,4 @@ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' dependencies { yamlRestTestImplementation project(":x-pack:plugin:core") diff --git a/x-pack/plugin/ilm/qa/rest/build.gradle b/x-pack/plugin/ilm/qa/rest/build.gradle index 2a3bfd39a838..6964fd717e84 100644 --- a/x-pack/plugin/ilm/qa/rest/build.gradle +++ b/x-pack/plugin/ilm/qa/rest/build.gradle @@ -1,4 +1,4 @@ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' dependencies { diff --git a/x-pack/plugin/ml/qa/ml-with-security/build.gradle b/x-pack/plugin/ml/qa/ml-with-security/build.gradle index 291267de4be6..5ecfefb85bd9 100644 --- a/x-pack/plugin/ml/qa/ml-with-security/build.gradle +++ b/x-pack/plugin/ml/qa/ml-with-security/build.gradle @@ -1,4 +1,4 @@ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' dependencies { yamlRestTestImplementation(testArtifact(project(xpackModule('core')))) diff --git a/x-pack/plugin/rollup/qa/rest/build.gradle b/x-pack/plugin/rollup/qa/rest/build.gradle index ddb8eff0b2a2..9ab08ad5af84 100644 --- a/x-pack/plugin/rollup/qa/rest/build.gradle +++ b/x-pack/plugin/rollup/qa/rest/build.gradle @@ -6,7 +6,7 @@ */ import org.elasticsearch.gradle.internal.info.BuildParams -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' dependencies { diff --git a/x-pack/plugin/searchable-snapshots/qa/rest/build.gradle b/x-pack/plugin/searchable-snapshots/qa/rest/build.gradle index defe6eb672ea..b340bbdcf5d7 100644 --- a/x-pack/plugin/searchable-snapshots/qa/rest/build.gradle +++ b/x-pack/plugin/searchable-snapshots/qa/rest/build.gradle @@ -1,5 +1,5 @@ apply plugin: 'elasticsearch.java-rest-test' -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' dependencies { diff --git a/x-pack/plugin/spatial/build.gradle b/x-pack/plugin/spatial/build.gradle index fd93d5b67dcc..20a9917d6cad 100644 --- a/x-pack/plugin/spatial/build.gradle +++ b/x-pack/plugin/spatial/build.gradle @@ -1,6 +1,6 @@ apply plugin: 'elasticsearch.internal-es-plugin' apply plugin: 'elasticsearch.internal-cluster-test' -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' esplugin { diff --git a/x-pack/plugin/stack/qa/rest/build.gradle b/x-pack/plugin/stack/qa/rest/build.gradle index 8f95a44c68dd..8990f8ef8c35 100644 --- a/x-pack/plugin/stack/qa/rest/build.gradle +++ b/x-pack/plugin/stack/qa/rest/build.gradle @@ -1,4 +1,4 @@ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' dependencies { diff --git a/x-pack/plugin/text-structure/qa/text-structure-with-security/build.gradle b/x-pack/plugin/text-structure/qa/text-structure-with-security/build.gradle index d56ccd5837a7..219ce40562c3 100644 --- a/x-pack/plugin/text-structure/qa/text-structure-with-security/build.gradle +++ b/x-pack/plugin/text-structure/qa/text-structure-with-security/build.gradle @@ -1,4 +1,4 @@ -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' dependencies { yamlRestTestImplementation(testArtifact(project(xpackModule('core')))) diff --git a/x-pack/plugin/watcher/qa/rest/build.gradle b/x-pack/plugin/watcher/qa/rest/build.gradle index f48e5c4db0bf..c0ba07637dc5 100644 --- a/x-pack/plugin/watcher/qa/rest/build.gradle +++ b/x-pack/plugin/watcher/qa/rest/build.gradle @@ -1,7 +1,7 @@ import org.elasticsearch.gradle.internal.info.BuildParams apply plugin: 'elasticsearch.java-rest-test' -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' dependencies { diff --git a/x-pack/plugin/watcher/qa/with-security/build.gradle b/x-pack/plugin/watcher/qa/with-security/build.gradle index 2d04da059f9a..2b284cc79cd0 100644 --- a/x-pack/plugin/watcher/qa/with-security/build.gradle +++ b/x-pack/plugin/watcher/qa/with-security/build.gradle @@ -1,5 +1,5 @@ apply plugin: 'elasticsearch.java-rest-test' -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' apply plugin: 'elasticsearch.yaml-rest-compat-test' dependencies { diff --git a/x-pack/qa/runtime-fields/build.gradle b/x-pack/qa/runtime-fields/build.gradle index f7698ae96a96..e5f5c228e6e4 100644 --- a/x-pack/qa/runtime-fields/build.gradle +++ b/x-pack/qa/runtime-fields/build.gradle @@ -9,7 +9,7 @@ tasks.named("test").configure { enabled = false } subprojects { if (project.name.startsWith('core-with-')) { - apply plugin: 'elasticsearch.yaml-rest-test' + apply plugin: 'elasticsearch.internal-yaml-rest-test' dependencies { yamlRestTestImplementation xpackProject(":x-pack:qa:runtime-fields")