diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy index 1cbbe0ac26d..01bab85b019 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy @@ -55,8 +55,10 @@ class BuildPlugin implements Plugin { @Override void apply(Project project) { - if (project.pluginManager.hasPlugin('elasticsearch.standalone-test')) { - throw new InvalidUserDataException('elasticsearch.standalone-test and elasticsearch.build are mutually exclusive') + if (project.pluginManager.hasPlugin('elasticsearch.standalone-rest-test')) { + throw new InvalidUserDataException('elasticsearch.standalone-test, ' + + 'elasticearch.standalone-rest-test, and elasticsearch.build ' + + 'are mutually exclusive') } project.pluginManager.apply('java') project.pluginManager.apply('carrotsearch.randomized-testing') diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/doc/DocsTestPlugin.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/doc/DocsTestPlugin.groovy index bb56360645f..66f9f0d4c4e 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/doc/DocsTestPlugin.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/doc/DocsTestPlugin.groovy @@ -30,7 +30,7 @@ public class DocsTestPlugin extends RestTestPlugin { @Override public void apply(Project project) { - project.pluginManager.apply('elasticsearch.standalone-test') + project.pluginManager.apply('elasticsearch.standalone-rest-test') super.apply(project) Map defaultSubstitutions = [ /* These match up with the asciidoc syntax for substitutions but diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/RestTestPlugin.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/RestTestPlugin.groovy index e4f4b35cc78..176b02cf9b0 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/RestTestPlugin.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/RestTestPlugin.groovy @@ -25,14 +25,14 @@ import org.gradle.api.Project /** * Adds support for starting an Elasticsearch cluster before running integration - * tests. Used in conjunction with {@link StandaloneTestBasePlugin} for qa + * tests. Used in conjunction with {@link StandaloneRestTestPlugin} for qa * projects and in conjunction with {@link BuildPlugin} for testing the rest * client. */ public class RestTestPlugin implements Plugin { List REQUIRED_PLUGINS = [ 'elasticsearch.build', - 'elasticsearch.standalone-test'] + 'elasticsearch.standalone-rest-test'] @Override public void apply(Project project) { diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/StandaloneTestBasePlugin.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/StandaloneRestTestPlugin.groovy similarity index 85% rename from buildSrc/src/main/groovy/org/elasticsearch/gradle/test/StandaloneTestBasePlugin.groovy rename to buildSrc/src/main/groovy/org/elasticsearch/gradle/test/StandaloneRestTestPlugin.groovy index b9b865cb62d..6e017671017 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/StandaloneTestBasePlugin.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/StandaloneRestTestPlugin.groovy @@ -30,13 +30,19 @@ import org.gradle.api.Project import org.gradle.api.Task import org.gradle.api.plugins.JavaBasePlugin -/** Configures the build to have a rest integration test. */ -public class StandaloneTestBasePlugin implements Plugin { +/** + * Configures the build to compile tests against Elasticsearch's test framework + * and run REST tests. Use BuildPlugin if you want to build main code as well + * as tests. + */ +public class StandaloneRestTestPlugin implements Plugin { @Override public void apply(Project project) { if (project.pluginManager.hasPlugin('elasticsearch.build')) { - throw new InvalidUserDataException('elasticsearch.standalone-test and elasticsearch.build are mutually exclusive') + throw new InvalidUserDataException('elasticsearch.standalone-test, ' + + 'elasticsearch.standalone-test, and elasticsearch.build are ' + + 'mutually exclusive') } project.pluginManager.apply(JavaBasePlugin) project.pluginManager.apply(RandomizedTestingPlugin) diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/StandaloneTestPlugin.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/StandaloneTestPlugin.groovy index fefd08fe4e5..de52d75c600 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/StandaloneTestPlugin.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/StandaloneTestPlugin.groovy @@ -25,12 +25,15 @@ import org.gradle.api.Plugin import org.gradle.api.Project import org.gradle.api.plugins.JavaBasePlugin -/** A plugin to add tests only. Used for QA tests that run arbitrary unit tests. */ +/** + * Configures the build to compile against Elasticsearch's test framework and + * run integration and unit tests. Use BuildPlugin if you want to build main + * code as well as tests. */ public class StandaloneTestPlugin implements Plugin { @Override public void apply(Project project) { - project.pluginManager.apply(StandaloneTestBasePlugin) + project.pluginManager.apply(StandaloneRestTestPlugin) Map testOptions = [ name: 'test', diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.standalone-rest-test.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.standalone-rest-test.properties new file mode 100644 index 00000000000..2daf4dc27c0 --- /dev/null +++ b/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.standalone-rest-test.properties @@ -0,0 +1,20 @@ +# +# Licensed to Elasticsearch under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +implementation-class=org.elasticsearch.gradle.test.StandaloneRestTestPlugin diff --git a/distribution/build.gradle b/distribution/build.gradle index 83f82d9cd6b..8fddd043229 100644 --- a/distribution/build.gradle +++ b/distribution/build.gradle @@ -1,5 +1,5 @@ /* - * Licensed to Elasticsearch under one or more contributor + // * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch licenses this file to you under @@ -104,7 +104,7 @@ subprojects { /***************************************************************************** * Rest test config * *****************************************************************************/ - apply plugin: 'elasticsearch.standalone-test' + apply plugin: 'elasticsearch.standalone-rest-test' apply plugin: 'elasticsearch.rest-test' project.integTest { dependsOn project.assemble diff --git a/qa/backwards-5.0/build.gradle b/qa/backwards-5.0/build.gradle index 6dd165121b7..c5e96757071 100644 --- a/qa/backwards-5.0/build.gradle +++ b/qa/backwards-5.0/build.gradle @@ -17,7 +17,7 @@ * under the License. */ -apply plugin: 'elasticsearch.standalone-test' +apply plugin: 'elasticsearch.standalone-rest-test' apply plugin: 'elasticsearch.rest-test' /* This project runs the core REST tests against a 2 node cluster where one of the nodes has a different minor. diff --git a/qa/evil-tests/build.gradle b/qa/evil-tests/build.gradle index cba9334fbca..472fc872616 100644 --- a/qa/evil-tests/build.gradle +++ b/qa/evil-tests/build.gradle @@ -42,7 +42,7 @@ thirdPartyAudit.excludes = [ 'com.google.common.cache.Striped64$Cell', 'com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator', 'com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator$1', - + // missing class 'com.ibm.icu.lang.UCharacter', ] diff --git a/qa/no-bootstrap-tests/build.gradle b/qa/no-bootstrap-tests/build.gradle index 16ac5e27693..25731a99dee 100644 --- a/qa/no-bootstrap-tests/build.gradle +++ b/qa/no-bootstrap-tests/build.gradle @@ -23,4 +23,3 @@ */ apply plugin: 'elasticsearch.standalone-test' - diff --git a/qa/smoke-test-client/build.gradle b/qa/smoke-test-client/build.gradle index fca4177d3bb..888d9325242 100644 --- a/qa/smoke-test-client/build.gradle +++ b/qa/smoke-test-client/build.gradle @@ -17,7 +17,7 @@ * under the License. */ -apply plugin: 'elasticsearch.standalone-test' +apply plugin: 'elasticsearch.standalone-rest-test' apply plugin: 'elasticsearch.rest-test' // TODO: this test works, but it isn't really a rest test...should we have another plugin for "non rest test that just needs N clusters?" diff --git a/qa/smoke-test-http/build.gradle b/qa/smoke-test-http/build.gradle index 2fb61243fe8..f394075e0f0 100644 --- a/qa/smoke-test-http/build.gradle +++ b/qa/smoke-test-http/build.gradle @@ -17,7 +17,7 @@ * under the License. */ -apply plugin: 'elasticsearch.standalone-test' +apply plugin: 'elasticsearch.standalone-rest-test' apply plugin: 'elasticsearch.rest-test' dependencies { diff --git a/qa/smoke-test-ingest-disabled/build.gradle b/qa/smoke-test-ingest-disabled/build.gradle index 1d7491a3517..4c4d9c2da12 100644 --- a/qa/smoke-test-ingest-disabled/build.gradle +++ b/qa/smoke-test-ingest-disabled/build.gradle @@ -17,7 +17,7 @@ * under the License. */ -apply plugin: 'elasticsearch.standalone-test' +apply plugin: 'elasticsearch.standalone-rest-test' apply plugin: 'elasticsearch.rest-test' dependencies { diff --git a/qa/smoke-test-ingest-with-all-dependencies/build.gradle b/qa/smoke-test-ingest-with-all-dependencies/build.gradle index e4ac1f29f89..2cfa3af434e 100644 --- a/qa/smoke-test-ingest-with-all-dependencies/build.gradle +++ b/qa/smoke-test-ingest-with-all-dependencies/build.gradle @@ -17,7 +17,7 @@ * under the License. */ -apply plugin: 'elasticsearch.standalone-test' +apply plugin: 'elasticsearch.standalone-rest-test' apply plugin: 'elasticsearch.rest-test' dependencies { diff --git a/qa/smoke-test-multinode/build.gradle b/qa/smoke-test-multinode/build.gradle index 52bf2427463..fc196fd52a4 100644 --- a/qa/smoke-test-multinode/build.gradle +++ b/qa/smoke-test-multinode/build.gradle @@ -17,7 +17,7 @@ * under the License. */ -apply plugin: 'elasticsearch.standalone-test' +apply plugin: 'elasticsearch.standalone-rest-test' apply plugin: 'elasticsearch.rest-test' integTest { diff --git a/qa/smoke-test-plugins/build.gradle b/qa/smoke-test-plugins/build.gradle index a5cf0839639..6fd722e409c 100644 --- a/qa/smoke-test-plugins/build.gradle +++ b/qa/smoke-test-plugins/build.gradle @@ -19,7 +19,7 @@ import org.elasticsearch.gradle.MavenFilteringHack -apply plugin: 'elasticsearch.standalone-test' +apply plugin: 'elasticsearch.standalone-rest-test' apply plugin: 'elasticsearch.rest-test' ext.pluginsCount = 0 diff --git a/qa/smoke-test-reindex-with-painless/build.gradle b/qa/smoke-test-reindex-with-painless/build.gradle index d9921d85d9a..7092c0a7b48 100644 --- a/qa/smoke-test-reindex-with-painless/build.gradle +++ b/qa/smoke-test-reindex-with-painless/build.gradle @@ -17,7 +17,7 @@ * under the License. */ -apply plugin: 'elasticsearch.standalone-test' +apply plugin: 'elasticsearch.standalone-rest-test' apply plugin: 'elasticsearch.rest-test' integTest { diff --git a/qa/smoke-test-tribe-node/build.gradle b/qa/smoke-test-tribe-node/build.gradle index 36b0a6ecd1c..94789b17fdb 100644 --- a/qa/smoke-test-tribe-node/build.gradle +++ b/qa/smoke-test-tribe-node/build.gradle @@ -21,7 +21,7 @@ import org.elasticsearch.gradle.test.ClusterConfiguration import org.elasticsearch.gradle.test.ClusterFormationTasks import org.elasticsearch.gradle.test.NodeInfo -apply plugin: 'elasticsearch.standalone-test' +apply plugin: 'elasticsearch.standalone-rest-test' apply plugin: 'elasticsearch.rest-test' List oneNodes