Browse Source

Apply REST API compatibility testing for the :modules (#71137)

Jake Landis 4 years ago
parent
commit
279fde375e

+ 1 - 0
modules/aggs-matrix-stats/build.gradle

@@ -6,6 +6,7 @@
  * Side Public License, v 1.
  */
 apply plugin: 'elasticsearch.yaml-rest-test'
+apply plugin: 'elasticsearch.yaml-rest-compat-test'
 
 esplugin {
   description 'Adds aggregations whose input are a list of numeric fields and output includes a matrix.'

+ 10 - 0
modules/analysis-common/build.gradle

@@ -6,6 +6,7 @@
  * Side Public License, v 1.
  */
 apply plugin: 'elasticsearch.yaml-rest-test'
+apply plugin: 'elasticsearch.yaml-rest-compat-test'
 apply plugin: 'elasticsearch.internal-cluster-test'
 
 esplugin {
@@ -23,3 +24,12 @@ restResources {
 dependencies {
   compileOnly project(':modules:lang-painless')
 }
+
+tasks.named("yamlRestCompatTest").configure {
+  systemProperty 'tests.rest.blacklist', [
+    'search.query/50_queries_with_synonyms/Test common terms query with stacked tokens',
+    'indices.analyze/10_analyze/htmlStrip_deprecated',
+    'analysis-common/40_token_filters/delimited_payload_filter_error',
+    'analysis-common/20_analyzers/standard_html_strip'
+  ].join(',')
+}

+ 2 - 0
modules/geo/build.gradle

@@ -6,6 +6,7 @@
  * Side Public License, v 1.
  */
 apply plugin: 'elasticsearch.yaml-rest-test'
+apply plugin: 'elasticsearch.yaml-rest-compat-test'
 
 import org.elasticsearch.gradle.info.BuildParams
 
@@ -28,4 +29,5 @@ if (BuildParams.inFipsJvm){
   // The geo module is replaced by spatial in the default distribution and in FIPS 140 mode, we set the testclusters to
   // use the default distribution, so there is no need to run these tests
   tasks.named("yamlRestTest").configure{enabled = false }
+  tasks.named("yamlRestCompatTest").configure{enabled = false }
 }

+ 9 - 0
modules/ingest-common/build.gradle

@@ -6,6 +6,7 @@
  * Side Public License, v 1.
  */
 apply plugin: 'elasticsearch.yaml-rest-test'
+apply plugin: 'elasticsearch.yaml-rest-compat-test'
 apply plugin: 'elasticsearch.internal-cluster-test'
 
 esplugin {
@@ -46,3 +47,11 @@ tasks.named("thirdPartyAudit").configure {
           'org.osgi.framework.wiring.BundleWiring'
   )
 }
+
+tasks.named("yamlRestCompatTest").configure {
+  systemProperty 'tests.rest.blacklist', [
+    'ingest/80_foreach/Test foreach Processor',
+    'ingest/230_change_target_index/Test Change Target Index with Explicit Pipeline',
+    'ingest/230_change_target_index/Test Change Target Index with Default Pipeline'
+  ].join(',')
+}

+ 1 - 0
modules/ingest-geoip/build.gradle

@@ -9,6 +9,7 @@
 import org.apache.tools.ant.taskdefs.condition.Os
 
 apply plugin: 'elasticsearch.yaml-rest-test'
+apply plugin: 'elasticsearch.yaml-rest-compat-test'
 apply plugin: 'elasticsearch.internal-cluster-test'
 
 esplugin {

+ 8 - 0
modules/ingest-user-agent/build.gradle

@@ -6,6 +6,7 @@
  * Side Public License, v 1.
  */
 apply plugin: 'elasticsearch.yaml-rest-test'
+apply plugin: 'elasticsearch.yaml-rest-compat-test'
 
 esplugin {
   description 'Ingest processor that extracts information from a user agent'
@@ -22,3 +23,10 @@ testClusters.all {
   extraConfigFile 'ingest-user-agent/test-regexes.yml', file('src/test/test-regexes.yml')
 }
 
+tasks.named("yamlRestCompatTest").configure {
+  systemProperty 'tests.rest.blacklist', [
+    'ingest-useragent/30_custom_regex/Test user agent processor with custom regex file',
+    'ingest-useragent/20_useragent_processor/Test user agent processor with defaults',
+    'ingest-useragent/20_useragent_processor/Test user agent processor with parameters'
+  ].join(',')
+}

+ 1 - 0
modules/lang-expression/build.gradle

@@ -6,6 +6,7 @@
  * Side Public License, v 1.
  */
 apply plugin: 'elasticsearch.yaml-rest-test'
+apply plugin: 'elasticsearch.yaml-rest-compat-test'
 apply plugin: 'elasticsearch.internal-cluster-test'
 
 esplugin {

+ 8 - 0
modules/lang-mustache/build.gradle

@@ -6,6 +6,7 @@
  * Side Public License, v 1.
  */
 apply plugin: 'elasticsearch.yaml-rest-test'
+apply plugin: 'elasticsearch.yaml-rest-compat-test'
 apply plugin: 'elasticsearch.java-rest-test'
 apply plugin: 'elasticsearch.internal-cluster-test'
 
@@ -24,3 +25,10 @@ restResources {
       'put_script', 'render_search_template', 'search_template', 'msearch_template', 'lang_mustache'
   }
 }
+
+tasks.named("yamlRestCompatTest").configure {
+  systemProperty 'tests.rest.blacklist', [
+    'lang_mustache/60_typed_keys/Multisearch template with typed_keys parameter',
+    'lang_mustache/60_typed_keys/Search template with typed_keys parameter'
+  ].join(',')
+}

+ 2 - 1
modules/lang-painless/build.gradle

@@ -9,6 +9,7 @@
 import org.elasticsearch.gradle.testclusters.DefaultTestClustersTask;
 apply plugin: 'elasticsearch.validate-rest-spec'
 apply plugin: 'elasticsearch.yaml-rest-test'
+apply plugin: 'elasticsearch.yaml-rest-compat-test'
 
 esplugin {
   description 'An easy, safe and fast scripting language for Elasticsearch'
@@ -283,4 +284,4 @@ tasks.register("regenSuggest") {
             patternset(includes: 'Suggest*.java')
         }
     }
-}
+}

+ 1 - 0
modules/mapper-extras/build.gradle

@@ -6,6 +6,7 @@
  * Side Public License, v 1.
  */
 apply plugin: 'elasticsearch.yaml-rest-test'
+apply plugin: 'elasticsearch.yaml-rest-compat-test'
 apply plugin: 'elasticsearch.internal-cluster-test'
 
 esplugin {

+ 9 - 0
modules/parent-join/build.gradle

@@ -6,6 +6,7 @@
  * Side Public License, v 1.
  */
 apply plugin: 'elasticsearch.yaml-rest-test'
+apply plugin: 'elasticsearch.yaml-rest-compat-test'
 apply plugin: 'elasticsearch.internal-cluster-test'
 
 esplugin {
@@ -18,3 +19,11 @@ restResources {
     include '_common', 'bulk', 'cluster', 'nodes', 'indices', 'index', 'search'
   }
 }
+
+tasks.named("yamlRestCompatTest").configure {
+  systemProperty 'tests.rest.blacklist', [
+    '/20_parent_join/Test parent_id query',
+    '/20_parent_join/Test basic',
+    '/30_inner_hits/Test two sub-queries with only one having inner_hits'
+  ].join(',')
+}

+ 1 - 0
modules/percolator/build.gradle

@@ -6,6 +6,7 @@
  * Side Public License, v 1.
  */
 apply plugin: 'elasticsearch.yaml-rest-test'
+apply plugin: 'elasticsearch.yaml-rest-compat-test'
 apply plugin: 'elasticsearch.internal-cluster-test'
 
 esplugin {

+ 1 - 0
modules/rank-eval/build.gradle

@@ -6,6 +6,7 @@
  * Side Public License, v 1.
  */
 apply plugin: 'elasticsearch.yaml-rest-test'
+apply plugin: 'elasticsearch.yaml-rest-compat-test'
 apply plugin: 'elasticsearch.internal-cluster-test'
 
 esplugin {

+ 8 - 0
modules/repository-url/build.gradle

@@ -9,6 +9,7 @@
 import org.elasticsearch.gradle.PropertyNormalization
 
 apply plugin: 'elasticsearch.yaml-rest-test'
+apply plugin: 'elasticsearch.yaml-rest-compat-test'
 apply plugin: 'elasticsearch.internal-cluster-test'
 apply plugin: 'elasticsearch.test.fixtures'
 
@@ -62,3 +63,10 @@ testClusters.all {
   }, PropertyNormalization.IGNORE_VALUE
 }
 
+tasks.named("yamlRestCompatTest").configure {
+  systemProperty 'tests.rest.blacklist', [
+    'repository_url/10_basic/Get a non existing snapshot',
+    'repository_url/10_basic/Restore with repository-url using http://',
+    'repository_url/10_basic/Restore with repository-url using file://'
+  ].join(',')
+}

+ 1 - 0
modules/runtime-fields-common/build.gradle

@@ -8,6 +8,7 @@
 
 apply plugin: 'elasticsearch.validate-rest-spec'
 apply plugin: 'elasticsearch.yaml-rest-test'
+apply plugin: 'elasticsearch.yaml-rest-compat-test'
 
 esplugin {
   description 'Module for runtime fields features and extensions that have large dependencies'

+ 1 - 0
modules/transport-netty4/build.gradle

@@ -13,6 +13,7 @@ import org.elasticsearch.gradle.test.rest.JavaRestTestPlugin
 import org.elasticsearch.gradle.test.InternalClusterTestPlugin
 
 apply plugin: 'elasticsearch.yaml-rest-test'
+apply plugin: 'elasticsearch.yaml-rest-compat-test'
 apply plugin: 'elasticsearch.java-rest-test'
 apply plugin: 'elasticsearch.internal-cluster-test'