diff --git a/build-tools-internal/build.gradle b/build-tools-internal/build.gradle index 13fd5dcd51c3..cf2dcf6856cb 100644 --- a/build-tools-internal/build.gradle +++ b/build-tools-internal/build.gradle @@ -152,8 +152,8 @@ gradlePlugin { implementationClass = 'org.elasticsearch.gradle.internal.precommit.ValidateRestSpecPlugin' } 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 19f723d07da0..527cd6277c72 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/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 e06a103a5ab1..5f4186b50aa2 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 21a4b0d09e61..772beae1747a 100644 --- a/build-tools/build.gradle +++ b/build-tools/build.gradle @@ -61,6 +61,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..f46fd3701751 --- /dev/null +++ b/build-tools/src/integTest/groovy/org/elasticsearch/gradle/test/YamlRestTestPluginFuncTest.groovy @@ -0,0 +1,61 @@ +/* + * 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 output = gradleRunner("dependencies").build().output + then: + output.contains(""" +restTestSpecs +/--- org.elasticsearch:rest-api-spec:${VersionProperties.elasticsearch} FAILED""") + output.contains(normalized(""" +yamlRestTestImplementation - Implementation only dependencies for source set 'yaml rest test'. (n) +/--- org.elasticsearch.test:framework:${VersionProperties.elasticsearch} (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 0ca2aaa32f66..10651083fd45 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 @@ -59,6 +59,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); @@ -129,7 +132,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 f8e7ffbe74bc..77397a1d1f08 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' esplugin { description 'Adds aggregations whose input are a list of numeric fields and output includes a matrix.' diff --git a/modules/analysis-common/build.gradle b/modules/analysis-common/build.gradle index 29d06492554b..b9f2d3a21446 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.internal-cluster-test' esplugin { diff --git a/modules/ingest-common/build.gradle b/modules/ingest-common/build.gradle index bef34f797016..6750898c2c9e 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.internal-cluster-test' esplugin { diff --git a/modules/ingest-geoip/build.gradle b/modules/ingest-geoip/build.gradle index 785221178927..bd800d32b6bf 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.internal-cluster-test' esplugin { diff --git a/modules/ingest-user-agent/build.gradle b/modules/ingest-user-agent/build.gradle index 76cdcde873a2..ed25bd109340 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' esplugin { description 'Ingest processor that extracts information from a user agent' @@ -21,4 +21,3 @@ restResources { testClusters.all { extraConfigFile 'ingest-user-agent/test-regexes.yml', file('src/test/test-regexes.yml') } - diff --git a/modules/lang-expression/build.gradle b/modules/lang-expression/build.gradle index 8952364c4df5..5e5a1cf3458d 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.internal-cluster-test' esplugin { @@ -30,4 +30,3 @@ tasks.named("dependencyLicenses").configure { mapping from: /lucene-.*/, to: 'lucene' mapping from: /asm-.*/, to: 'asm' } - diff --git a/modules/lang-mustache/build.gradle b/modules/lang-mustache/build.gradle index 01492c7e244b..3caee1bfb78b 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.java-rest-test' apply plugin: 'elasticsearch.internal-cluster-test' diff --git a/modules/lang-painless/build.gradle b/modules/lang-painless/build.gradle index d12528b9dec4..50be7c16cf36 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' esplugin { description 'An easy, safe and fast scripting language for Elasticsearch' @@ -312,4 +312,4 @@ tasks.register("regenSuggest") { patternset(includes: 'Suggest*.java') } } -} \ No newline at end of file +} diff --git a/modules/mapper-extras/build.gradle b/modules/mapper-extras/build.gradle index 5f23342f528c..665ef19b16b7 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.internal-cluster-test' esplugin { diff --git a/modules/parent-join/build.gradle b/modules/parent-join/build.gradle index ef49fe4516b3..a8c175892d61 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.internal-cluster-test' esplugin { diff --git a/modules/percolator/build.gradle b/modules/percolator/build.gradle index 8fc1ad55b313..0070032f9afb 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.internal-cluster-test' esplugin { diff --git a/modules/rank-eval/build.gradle b/modules/rank-eval/build.gradle index ba22fcc18afc..cefd934f23f3 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.internal-cluster-test' esplugin { diff --git a/modules/reindex/build.gradle b/modules/reindex/build.gradle index e0f64a5996e6..2e9523e5a883 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.internal-cluster-test' diff --git a/modules/repository-url/build.gradle b/modules/repository-url/build.gradle index 11d7d9dda452..30434465d392 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.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 69c5f599d1e3..9caa152f4e9d 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' esplugin { description 'Module for runtime fields features and extensions that have large dependencies' diff --git a/modules/transport-netty4/build.gradle b/modules/transport-netty4/build.gradle index ab3712a46d7e..3ac0c4eee248 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.java-rest-test' apply plugin: 'elasticsearch.internal-cluster-test' diff --git a/plugins/analysis-icu/build.gradle b/plugins/analysis-icu/build.gradle index 36ed62dd5a4e..6721844c640b 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.internal-cluster-test' esplugin { diff --git a/plugins/analysis-kuromoji/build.gradle b/plugins/analysis-kuromoji/build.gradle index 9dc92eeaf8b0..1a888fe910ea 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' esplugin { description 'The Japanese (kuromoji) Analysis plugin integrates Lucene kuromoji analysis module into elasticsearch.' diff --git a/plugins/analysis-nori/build.gradle b/plugins/analysis-nori/build.gradle index bb3c6dff14ae..765ebae25558 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' esplugin { description 'The Korean (nori) Analysis plugin integrates Lucene nori analysis module into elasticsearch.' diff --git a/plugins/analysis-phonetic/build.gradle b/plugins/analysis-phonetic/build.gradle index f96fd78f9dfb..26dd9909453d 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' esplugin { description 'The Phonetic Analysis plugin integrates phonetic token filter analysis with elasticsearch.' diff --git a/plugins/analysis-smartcn/build.gradle b/plugins/analysis-smartcn/build.gradle index 7a6dc259c79e..1f821c2aaca0 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' esplugin { description 'Smart Chinese Analysis plugin integrates Lucene Smart Chinese analysis module into elasticsearch.' @@ -31,5 +31,5 @@ tasks.named('splitPackagesAudit').configure { ignoreClasses 'org.elasticsearch.index.analysis.SmartChineseAnalyzerProvider', 'org.elasticsearch.index.analysis.SmartChineseNoOpTokenFilterFactory', 'org.elasticsearch.index.analysis.SmartChineseStopTokenFilterFactory', - 'org.elasticsearch.index.analysis.SmartChineseTokenizerTokenizerFactory' + 'org.elasticsearch.index.analysis.SmartChineseTokenizerTokenizerFactory' } diff --git a/plugins/analysis-stempel/build.gradle b/plugins/analysis-stempel/build.gradle index 05f451e7a0a8..115a3a050fda 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' esplugin { description 'The Stempel (Polish) Analysis plugin integrates Lucene stempel (polish) analysis module into elasticsearch.' diff --git a/plugins/analysis-ukrainian/build.gradle b/plugins/analysis-ukrainian/build.gradle index c457d8a0182e..a85cccac2486 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' esplugin { description 'The Ukrainian Analysis plugin integrates the Lucene UkrainianMorfologikAnalyzer into elasticsearch.' diff --git a/plugins/discovery-azure-classic/build.gradle b/plugins/discovery-azure-classic/build.gradle index 80afe45ea7f3..aa1e80d84112 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 070714216106..d4a57d83e4db 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 c96ed3f5a059..511eb340f098 100644 --- a/plugins/examples/build.gradle +++ b/plugins/examples/build.gradle @@ -1,8 +1,8 @@ import org.elasticsearch.gradle.internal.info.BuildParams // Subprojects aren't published so do not assemble gradle.projectsEvaluated { - subprojects { - project.tasks.matching { it.name.equals('assemble') }.configureEach { + subprojects { p -> + p.tasks.matching { it.name.equals('assemble') }.configureEach { enabled = false } // Disable example project testing with FIPS JVM @@ -11,6 +11,16 @@ gradle.projectsEvaluated { BuildParams.inFipsJvm == 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')) + } + }) } } diff --git a/plugins/ingest-attachment/build.gradle b/plugins/ingest-attachment/build.gradle index 30ba56e8380a..2f62e7269dcd 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' esplugin { description 'Ingest processor that uses Apache Tika to extract contents' diff --git a/plugins/mapper-annotated-text/build.gradle b/plugins/mapper-annotated-text/build.gradle index 57db2c02b979..6c67f9fcab2a 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.internal-cluster-test' esplugin { diff --git a/plugins/mapper-murmur3/build.gradle b/plugins/mapper-murmur3/build.gradle index 7ad343829780..d80c4b0970df 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' esplugin { description 'The Mapper Murmur3 plugin allows to compute hashes of a field\'s values at index-time and to store them in the index.' diff --git a/plugins/mapper-size/build.gradle b/plugins/mapper-size/build.gradle index a840a4be88dc..50280b31abe0 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.internal-cluster-test' esplugin { diff --git a/plugins/repository-azure/build.gradle b/plugins/repository-azure/build.gradle index 389226a14510..e633db8eca61 100644 --- a/plugins/repository-azure/build.gradle +++ b/plugins/repository-azure/build.gradle @@ -12,7 +12,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 a04a8914213c..4aaf0e0fbc39 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' @@ -230,7 +230,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()) @@ -258,7 +258,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 a7a5d7075cdd..7f1c3ae92ab8 100644 --- a/rest-api-spec/build.gradle +++ b/rest-api-spec/build.gradle @@ -2,7 +2,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' restResources { restTests { @@ -14,7 +14,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 d38279b840c2..251d7751084a 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' esplugin { name 'x-pack-test-deprecated-query' diff --git a/x-pack/plugin/autoscaling/qa/rest/build.gradle b/x-pack/plugin/autoscaling/qa/rest/build.gradle index 24ab26a58683..78527aa27cbf 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' dependencies { yamlRestTestImplementation(testArtifact(project(xpackModule('core')))) diff --git a/x-pack/plugin/build.gradle b/x-pack/plugin/build.gradle index 3f9ad93ff6cd..fc3e1a3b8254 100644 --- a/x-pack/plugin/build.gradle +++ b/x-pack/plugin/build.gradle @@ -5,7 +5,7 @@ import org.elasticsearch.gradle.LoggedExec import org.elasticsearch.gradle.util.GradleUtils -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-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 ef736299a775..45ffb2e395ca 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' restResources { restApi { @@ -22,4 +22,3 @@ testClusters.all { // TODO: reduce the need for superuser here user username: 'ccr-user', password: 'ccr-user-password', role: 'superuser' } - diff --git a/x-pack/plugin/core/build.gradle b/x-pack/plugin/core/build.gradle index 2de92a8804d1..1b73e3816123 100644 --- a/x-pack/plugin/core/build.gradle +++ b/x-pack/plugin/core/build.gradle @@ -7,7 +7,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.internal-test-artifact' archivesBaseName = 'x-pack-core' diff --git a/x-pack/plugin/data-streams/qa/rest/build.gradle b/x-pack/plugin/data-streams/qa/rest/build.gradle index 3fb19b8ef6f8..b7ddf86066a9 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.yaml-rest-test' apply plugin: 'elasticsearch.java-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' restResources { restApi { diff --git a/x-pack/plugin/enrich/qa/rest/build.gradle b/x-pack/plugin/enrich/qa/rest/build.gradle index c61e6f656ed7..a1dddf52a320 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' 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 e0eed9a16201..dd92d1072569 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' 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 1fca134025de..11129f307f3a 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' dependencies { yamlRestTestImplementation(testArtifact(project(xpackModule('core')))) 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 6c5e75fd74cb..b9e75add3553 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 e3cb2b9722e6..d7f98a26f570 100644 --- a/x-pack/plugin/rollup/qa/rest/build.gradle +++ b/x-pack/plugin/rollup/qa/rest/build.gradle @@ -6,8 +6,7 @@ */ import org.elasticsearch.gradle.internal.info.BuildParams -apply plugin: 'elasticsearch.yaml-rest-test' - +apply plugin: 'elasticsearch.internal-yaml-rest-test' dependencies { yamlRestTestImplementation project(path: xpackModule('rollup')) diff --git a/x-pack/plugin/searchable-snapshots/qa/rest/build.gradle b/x-pack/plugin/searchable-snapshots/qa/rest/build.gradle index edd31024502b..8d55e58500c3 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' dependencies { javaRestTestImplementation(testArtifact(project(xpackModule('searchable-snapshots')))) diff --git a/x-pack/plugin/spatial/build.gradle b/x-pack/plugin/spatial/build.gradle index 7cd2344f0cd0..fbe2797d5e21 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' esplugin { name 'spatial' diff --git a/x-pack/plugin/stack/qa/rest/build.gradle b/x-pack/plugin/stack/qa/rest/build.gradle index 5ba076462ecd..96f2e8c0a4e9 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' dependencies { yamlRestTestImplementation(testArtifact(project(xpackModule('core'))))} 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 9a79397e69cc..cdd781c4979a 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.yaml-rest-test' apply plugin: 'elasticsearch.java-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' dependencies { yamlRestTestImplementation project(path: ':x-pack:plugin:watcher:qa:common') diff --git a/x-pack/plugin/watcher/qa/with-security/build.gradle b/x-pack/plugin/watcher/qa/with-security/build.gradle index b755225e4f5e..45c6470448ba 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.yaml-rest-test' apply plugin: 'elasticsearch.java-rest-test' +apply plugin: 'elasticsearch.internal-yaml-rest-test' dependencies { yamlRestTestImplementation project(path: ':x-pack:plugin:watcher:qa:common') diff --git a/x-pack/qa/runtime-fields/build.gradle b/x-pack/qa/runtime-fields/build.gradle index 8529b43f3c52..568bd577ed17 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")