From 665b7b7bd8a4dd5bd14eb47ff66354206d445420 Mon Sep 17 00:00:00 2001 From: Jake Landis Date: Mon, 13 Jul 2020 13:53:05 -0500 Subject: [PATCH] Convert modules to use yamlRestTest (#59089) (#59446) This commit moves the modules REST tests to the newly introduced yamlRestTest source set. A few tests have also been re-named to include the correct IT suffix. Without changing the names, the testing conventions task would fail since now that the YAML tests are no longer present pacify the convention. These tests have moved to the internalClusterTest source set. related: #56841 --- modules/aggs-matrix-stats/build.gradle | 4 ++- .../MatrixStatsClientYamlTestSuiteIT.java | 0 .../rest-api-spec/test/stats/10_basic.yml | 0 .../test/stats/20_empty_bucket.yml | 0 .../test/stats/30_single_value_field.yml | 0 .../test/stats/40_multi_value_field.yml | 0 modules/analysis-common/build.gradle | 2 +- ...s.java => QueryStringWithAnalyzersIT.java} | 2 +- .../CommonAnalysisClientYamlTestSuiteIT.java | 0 .../test/analysis-common/10_basic.yml | 0 .../test/analysis-common/20_analyzers.yml | 0 .../test/analysis-common/30_tokenizers.yml | 0 .../test/analysis-common/40_token_filters.yml | 0 .../test/analysis-common/50_char_filters.yml | 0 .../analysis-common/60_analysis_scripting.yml | 0 .../test/cluster.stats/10_analysis_stats.yml | 0 .../test/indices.analyze/10_analyze.yml | 0 .../test/indices.analyze/10_synonyms.yml | 0 .../indices/validate_query/10_synonyms.yml | 0 .../test/search.query/10_match.yml | 0 .../test/search.query/20_ngram_search.yml | 0 .../search.query/30_ngram_highligthing.yml | 0 .../test/search.query/40_query_string.yml | 0 .../search.query/50_queries_with_synonyms.yml | 0 .../test/search.query/60_synonym_graph.yml | 0 .../test/search.query/70_intervals.yml | 0 .../test/search.suggest/20_phrase.yml | 0 .../test/search.suggest/30_synonyms.yml | 0 .../test/termvectors/10_payloads.yml | 0 modules/geo/build.gradle | 14 ++++++++-- .../java/org/elasticsearch/geo/GeoTests.java | 28 ------------------- .../geo/GeoClientYamlTestSuiteIT.java | 0 .../rest-api-spec/test/geo_shape/10_basic.yml | 0 modules/ingest-common/build.gradle | 4 +-- .../IngestCommonClientYamlTestSuiteIT.java | 0 .../ingest/100_date_index_name_processor.yml | 0 .../rest-api-spec/test/ingest/10_basic.yml | 0 .../rest-api-spec/test/ingest/110_sort.yml | 0 .../rest-api-spec/test/ingest/120_grok.yml | 0 .../test/ingest/130_escape_dot.yml | 0 .../rest-api-spec/test/ingest/140_json.yml | 0 .../rest-api-spec/test/ingest/150_kv.yml | 0 .../test/ingest/160_urldecode.yml | 0 .../rest-api-spec/test/ingest/170_version.yml | 0 .../test/ingest/180_bytes_processor.yml | 0 .../test/ingest/190_script_processor.yml | 0 .../test/ingest/200_default_pipeline.yml | 0 .../test/ingest/200_dissect_processor.yml | 0 .../rest-api-spec/test/ingest/20_crud.yml | 0 .../test/ingest/210_conditional_processor.yml | 0 .../test/ingest/210_pipeline_processor.yml | 0 .../test/ingest/220_drop_processor.yml | 0 .../test/ingest/230_change_target_index.yml | 0 .../test/ingest/240_required_pipeline.yml | 0 .../rest-api-spec/test/ingest/250_csv.yml | 0 .../rest-api-spec/test/ingest/260_seq_no.yml | 0 .../test/ingest/270_set_processor.yml | 0 .../test/ingest/30_date_processor.yml | 0 .../rest-api-spec/test/ingest/40_mutate.yml | 0 .../test/ingest/50_on_failure.yml | 0 .../rest-api-spec/test/ingest/60_fail.yml | 0 .../rest-api-spec/test/ingest/70_bulk.yml | 0 .../rest-api-spec/test/ingest/80_foreach.yml | 0 .../rest-api-spec/test/ingest/90_simulate.yml | 0 modules/ingest-geoip/build.gradle | 5 +++- .../geoip/GeoIpProcessorNonIngestNodeIT.java} | 2 +- .../IngestGeoIpClientYamlTestSuiteIT.java | 0 .../test/ingest_geoip/10_basic.yml | 0 .../test/ingest_geoip/20_geoip_processor.yml | 0 modules/ingest-user-agent/build.gradle | 6 ++-- .../IngestUserAgentClientYamlTestSuiteIT.java | 0 .../test/ingest-useragent/10_basic.yml | 0 .../20_useragent_processor.yml | 0 .../test/ingest-useragent/30_custom_regex.yml | 0 modules/lang-expression/build.gradle | 5 +++- .../script/expression/MoreExpressionIT.java} | 2 +- .../expression/StoredExpressionIT.java} | 2 +- .../LangExpressionClientYamlTestSuiteIT.java | 0 .../test/lang_expression/10_basic.yml | 0 .../test/lang_expression/20_search.yml | 0 modules/lang-mustache/build.gradle | 2 +- .../LangMustacheClientYamlTestSuiteIT.java | 0 .../test/lang_mustache/10_basic.yml | 0 .../20_render_search_template.yml | 0 .../lang_mustache/25_custom_functions.yml | 0 .../test/lang_mustache/30_search_template.yml | 0 .../50_multi_search_template.yml | 0 .../test/lang_mustache/60_typed_keys.yml | 0 modules/lang-painless/build.gradle | 6 ++-- .../LangPainlessClientYamlTestSuiteIT.java | 0 .../api/scripts_painless_context.json | 0 .../test/painless/100_terms_agg.yml | 0 .../rest-api-spec/test/painless/10_basic.yml | 0 .../test/painless/110_script_score_boost.yml | 0 .../rest-api-spec/test/painless/15_update.yml | 0 .../test/painless/16_update2.yml | 0 .../test/painless/17_update_error.yml | 0 .../test/painless/20_scriptfield.yml | 0 .../test/painless/25_script_upsert.yml | 0 .../rest-api-spec/test/painless/30_search.yml | 0 .../test/painless/40_disabled.yml | 0 .../test/painless/50_script_doc_values.yml | 0 .../painless/60_script_doc_values_binary.yml | 0 .../painless/70_execute_painless_scripts.yml | 0 .../test/painless/70_mov_fn_agg.yml | 0 .../test/painless/71_context_api.yml | 0 .../test/painless/80_script_score.yml | 0 .../painless/85_script_score_random_score.yml | 0 .../painless/90_interval_query_filter.yml | 0 modules/mapper-extras/build.gradle | 2 +- .../MapperExtrasClientYamlTestSuiteIT.java | 0 .../test/rank_feature/10_basic.yml | 0 .../test/rank_features/10_basic.yml | 0 .../test/scaled_float/10_basic.yml | 0 .../test/search-as-you-type/10_basic.yml | 0 .../search-as-you-type/20_highlighting.yml | 0 modules/parent-join/build.gradle | 2 +- .../ParentChildClientYamlTestSuiteIT.java | 0 .../rest-api-spec/test/11_parent_child.yml | 0 .../rest-api-spec/test/20_parent_join.yml | 0 .../rest-api-spec/test/30_inner_hits.yml | 0 modules/percolator/build.gradle | 4 ++- .../PercolatorClientYamlTestSuiteIT.java | 0 .../resources/rest-api-spec/test/10_basic.yml | 0 modules/rank-eval/build.gradle | 4 +-- .../index/rankeval/RankEvalYamlIT.java | 0 .../rest-api-spec/test/rank_eval/10_basic.yml | 0 .../rest-api-spec/test/rank_eval/20_dcg.yml | 0 .../test/rank_eval/30_failures.yml | 0 .../test/rank_eval/40_rank_eval_templated.yml | 0 modules/reindex/build.gradle | 4 +-- .../reindex/ReindexClientYamlTestSuiteIT.java | 0 .../test/delete_by_query/10_basic.yml | 0 .../test/delete_by_query/20_validation.yml | 0 .../test/delete_by_query/40_versioning.yml | 0 .../50_wait_for_active_shards.yml | 0 .../test/delete_by_query/70_throttle.yml | 0 .../test/delete_by_query/80_slices.yml | 0 .../rest-api-spec/test/reindex/10_basic.yml | 0 .../test/reindex/20_validation.yml | 0 .../test/reindex/25_no_auto_create.yml | 0 .../rest-api-spec/test/reindex/30_search.yml | 0 .../test/reindex/35_search_failures.yml | 0 .../test/reindex/40_versioning.yml | 0 .../rest-api-spec/test/reindex/50_routing.yml | 0 .../reindex/60_wait_for_active_shards.yml | 0 .../test/reindex/70_throttle.yml | 0 .../rest-api-spec/test/reindex/80_slices.yml | 0 .../test/reindex/85_scripting.yml | 0 .../rest-api-spec/test/reindex/90_remote.yml | 0 .../test/reindex/95_parent_join.yml | 0 .../test/update_by_query/10_basic.yml | 0 .../test/update_by_query/20_validation.yml | 0 .../test/update_by_query/30_new_fields.yml | 0 .../update_by_query/35_search_failure.yml | 0 .../test/update_by_query/40_versioning.yml | 0 .../test/update_by_query/50_consistency.yml | 0 .../test/update_by_query/60_throttle.yml | 0 .../test/update_by_query/70_slices.yml | 0 .../test/update_by_query/80_scripting.yml | 0 modules/repository-url/build.gradle | 16 ++++++++--- .../url/URLSnapshotRestoreIT.java} | 2 +- .../RepositoryURLClientYamlTestSuiteIT.java | 4 +-- .../test/repository_url/10_basic.yml | 0 .../test/repository_url/20_repository.yml | 0 modules/transport-netty4/build.gradle | 2 +- .../netty4/Netty4ClientYamlTestSuiteIT.java | 0 .../resources/rest-api-spec/test/10_basic.yml | 0 168 files changed, 63 insertions(+), 61 deletions(-) rename modules/aggs-matrix-stats/src/{test => yamlRestTest}/java/org/elasticsearch/search/aggregations/matrix/MatrixStatsClientYamlTestSuiteIT.java (100%) rename modules/aggs-matrix-stats/src/{test => yamlRestTest}/resources/rest-api-spec/test/stats/10_basic.yml (100%) rename modules/aggs-matrix-stats/src/{test => yamlRestTest}/resources/rest-api-spec/test/stats/20_empty_bucket.yml (100%) rename modules/aggs-matrix-stats/src/{test => yamlRestTest}/resources/rest-api-spec/test/stats/30_single_value_field.yml (100%) rename modules/aggs-matrix-stats/src/{test => yamlRestTest}/resources/rest-api-spec/test/stats/40_multi_value_field.yml (100%) rename modules/analysis-common/src/test/java/org/elasticsearch/analysis/common/{QueryStringWithAnalyzersTests.java => QueryStringWithAnalyzersIT.java} (98%) rename modules/analysis-common/src/{test => yamlRestTest}/java/org/elasticsearch/analysis/common/CommonAnalysisClientYamlTestSuiteIT.java (100%) rename modules/analysis-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/analysis-common/10_basic.yml (100%) rename modules/analysis-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/analysis-common/20_analyzers.yml (100%) rename modules/analysis-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/analysis-common/30_tokenizers.yml (100%) rename modules/analysis-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/analysis-common/40_token_filters.yml (100%) rename modules/analysis-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/analysis-common/50_char_filters.yml (100%) rename modules/analysis-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/analysis-common/60_analysis_scripting.yml (100%) rename modules/analysis-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/cluster.stats/10_analysis_stats.yml (100%) rename modules/analysis-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/indices.analyze/10_analyze.yml (100%) rename modules/analysis-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/indices.analyze/10_synonyms.yml (100%) rename modules/analysis-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/indices/validate_query/10_synonyms.yml (100%) rename modules/analysis-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/search.query/10_match.yml (100%) rename modules/analysis-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/search.query/20_ngram_search.yml (100%) rename modules/analysis-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/search.query/30_ngram_highligthing.yml (100%) rename modules/analysis-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/search.query/40_query_string.yml (100%) rename modules/analysis-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/search.query/50_queries_with_synonyms.yml (100%) rename modules/analysis-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/search.query/60_synonym_graph.yml (100%) rename modules/analysis-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/search.query/70_intervals.yml (100%) rename modules/analysis-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/search.suggest/20_phrase.yml (100%) rename modules/analysis-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/search.suggest/30_synonyms.yml (100%) rename modules/analysis-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/termvectors/10_payloads.yml (100%) delete mode 100644 modules/geo/src/test/java/org/elasticsearch/geo/GeoTests.java rename modules/geo/src/{test => yamlRestTest}/java/org/elasticsearch/geo/GeoClientYamlTestSuiteIT.java (100%) rename modules/geo/src/{test => yamlRestTest}/resources/rest-api-spec/test/geo_shape/10_basic.yml (100%) rename modules/ingest-common/src/{test => yamlRestTest}/java/org/elasticsearch/ingest/common/IngestCommonClientYamlTestSuiteIT.java (100%) rename modules/ingest-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/ingest/100_date_index_name_processor.yml (100%) rename modules/ingest-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/ingest/10_basic.yml (100%) rename modules/ingest-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/ingest/110_sort.yml (100%) rename modules/ingest-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/ingest/120_grok.yml (100%) rename modules/ingest-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/ingest/130_escape_dot.yml (100%) rename modules/ingest-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/ingest/140_json.yml (100%) rename modules/ingest-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/ingest/150_kv.yml (100%) rename modules/ingest-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/ingest/160_urldecode.yml (100%) rename modules/ingest-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/ingest/170_version.yml (100%) rename modules/ingest-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/ingest/180_bytes_processor.yml (100%) rename modules/ingest-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/ingest/190_script_processor.yml (100%) rename modules/ingest-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/ingest/200_default_pipeline.yml (100%) rename modules/ingest-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/ingest/200_dissect_processor.yml (100%) rename modules/ingest-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/ingest/20_crud.yml (100%) rename modules/ingest-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/ingest/210_conditional_processor.yml (100%) rename modules/ingest-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/ingest/210_pipeline_processor.yml (100%) rename modules/ingest-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/ingest/220_drop_processor.yml (100%) rename modules/ingest-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/ingest/230_change_target_index.yml (100%) rename modules/ingest-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/ingest/240_required_pipeline.yml (100%) rename modules/ingest-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/ingest/250_csv.yml (100%) rename modules/ingest-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/ingest/260_seq_no.yml (100%) rename modules/ingest-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/ingest/270_set_processor.yml (100%) rename modules/ingest-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/ingest/30_date_processor.yml (100%) rename modules/ingest-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/ingest/40_mutate.yml (100%) rename modules/ingest-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/ingest/50_on_failure.yml (100%) rename modules/ingest-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/ingest/60_fail.yml (100%) rename modules/ingest-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/ingest/70_bulk.yml (100%) rename modules/ingest-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/ingest/80_foreach.yml (100%) rename modules/ingest-common/src/{test => yamlRestTest}/resources/rest-api-spec/test/ingest/90_simulate.yml (100%) rename modules/ingest-geoip/src/{test/java/org/elasticsearch/ingest/geoip/GeoIpProcessorNonIngestNodeTests.java => internalClusterTest/java/org/elasticsearch/ingest/geoip/GeoIpProcessorNonIngestNodeIT.java} (99%) rename modules/ingest-geoip/src/{test => yamlRestTest}/java/org/elasticsearch/ingest/geoip/IngestGeoIpClientYamlTestSuiteIT.java (100%) rename modules/ingest-geoip/src/{test => yamlRestTest}/resources/rest-api-spec/test/ingest_geoip/10_basic.yml (100%) rename modules/ingest-geoip/src/{test => yamlRestTest}/resources/rest-api-spec/test/ingest_geoip/20_geoip_processor.yml (100%) rename modules/ingest-user-agent/src/{test => yamlRestTest}/java/org/elasticsearch/ingest/useragent/IngestUserAgentClientYamlTestSuiteIT.java (100%) rename modules/ingest-user-agent/src/{test => yamlRestTest}/resources/rest-api-spec/test/ingest-useragent/10_basic.yml (100%) rename modules/ingest-user-agent/src/{test => yamlRestTest}/resources/rest-api-spec/test/ingest-useragent/20_useragent_processor.yml (100%) rename modules/ingest-user-agent/src/{test => yamlRestTest}/resources/rest-api-spec/test/ingest-useragent/30_custom_regex.yml (100%) rename modules/lang-expression/src/{test/java/org/elasticsearch/script/expression/MoreExpressionTests.java => internalClusterTest/java/org/elasticsearch/script/expression/MoreExpressionIT.java} (99%) rename modules/lang-expression/src/{test/java/org/elasticsearch/script/expression/StoredExpressionTests.java => internalClusterTest/java/org/elasticsearch/script/expression/StoredExpressionIT.java} (98%) rename modules/lang-expression/src/{test => yamlRestTest}/java/org/elasticsearch/script/expression/LangExpressionClientYamlTestSuiteIT.java (100%) rename modules/lang-expression/src/{test => yamlRestTest}/resources/rest-api-spec/test/lang_expression/10_basic.yml (100%) rename modules/lang-expression/src/{test => yamlRestTest}/resources/rest-api-spec/test/lang_expression/20_search.yml (100%) rename modules/lang-mustache/src/{test => yamlRestTest}/java/org/elasticsearch/script/mustache/LangMustacheClientYamlTestSuiteIT.java (100%) rename modules/lang-mustache/src/{test => yamlRestTest}/resources/rest-api-spec/test/lang_mustache/10_basic.yml (100%) rename modules/lang-mustache/src/{test => yamlRestTest}/resources/rest-api-spec/test/lang_mustache/20_render_search_template.yml (100%) rename modules/lang-mustache/src/{test => yamlRestTest}/resources/rest-api-spec/test/lang_mustache/25_custom_functions.yml (100%) rename modules/lang-mustache/src/{test => yamlRestTest}/resources/rest-api-spec/test/lang_mustache/30_search_template.yml (100%) rename modules/lang-mustache/src/{test => yamlRestTest}/resources/rest-api-spec/test/lang_mustache/50_multi_search_template.yml (100%) rename modules/lang-mustache/src/{test => yamlRestTest}/resources/rest-api-spec/test/lang_mustache/60_typed_keys.yml (100%) rename modules/lang-painless/src/{test => yamlRestTest}/java/org/elasticsearch/painless/LangPainlessClientYamlTestSuiteIT.java (100%) rename modules/lang-painless/src/{test => yamlRestTest}/resources/rest-api-spec/api/scripts_painless_context.json (100%) rename modules/lang-painless/src/{test => yamlRestTest}/resources/rest-api-spec/test/painless/100_terms_agg.yml (100%) rename modules/lang-painless/src/{test => yamlRestTest}/resources/rest-api-spec/test/painless/10_basic.yml (100%) rename modules/lang-painless/src/{test => yamlRestTest}/resources/rest-api-spec/test/painless/110_script_score_boost.yml (100%) rename modules/lang-painless/src/{test => yamlRestTest}/resources/rest-api-spec/test/painless/15_update.yml (100%) rename modules/lang-painless/src/{test => yamlRestTest}/resources/rest-api-spec/test/painless/16_update2.yml (100%) rename modules/lang-painless/src/{test => yamlRestTest}/resources/rest-api-spec/test/painless/17_update_error.yml (100%) rename modules/lang-painless/src/{test => yamlRestTest}/resources/rest-api-spec/test/painless/20_scriptfield.yml (100%) rename modules/lang-painless/src/{test => yamlRestTest}/resources/rest-api-spec/test/painless/25_script_upsert.yml (100%) rename modules/lang-painless/src/{test => yamlRestTest}/resources/rest-api-spec/test/painless/30_search.yml (100%) rename modules/lang-painless/src/{test => yamlRestTest}/resources/rest-api-spec/test/painless/40_disabled.yml (100%) rename modules/lang-painless/src/{test => yamlRestTest}/resources/rest-api-spec/test/painless/50_script_doc_values.yml (100%) rename modules/lang-painless/src/{test => yamlRestTest}/resources/rest-api-spec/test/painless/60_script_doc_values_binary.yml (100%) rename modules/lang-painless/src/{test => yamlRestTest}/resources/rest-api-spec/test/painless/70_execute_painless_scripts.yml (100%) rename modules/lang-painless/src/{test => yamlRestTest}/resources/rest-api-spec/test/painless/70_mov_fn_agg.yml (100%) rename modules/lang-painless/src/{test => yamlRestTest}/resources/rest-api-spec/test/painless/71_context_api.yml (100%) rename modules/lang-painless/src/{test => yamlRestTest}/resources/rest-api-spec/test/painless/80_script_score.yml (100%) rename modules/lang-painless/src/{test => yamlRestTest}/resources/rest-api-spec/test/painless/85_script_score_random_score.yml (100%) rename modules/lang-painless/src/{test => yamlRestTest}/resources/rest-api-spec/test/painless/90_interval_query_filter.yml (100%) rename modules/mapper-extras/src/{test => yamlRestTest}/java/org/elasticsearch/index/mapper/MapperExtrasClientYamlTestSuiteIT.java (100%) rename modules/mapper-extras/src/{test => yamlRestTest}/resources/rest-api-spec/test/rank_feature/10_basic.yml (100%) rename modules/mapper-extras/src/{test => yamlRestTest}/resources/rest-api-spec/test/rank_features/10_basic.yml (100%) rename modules/mapper-extras/src/{test => yamlRestTest}/resources/rest-api-spec/test/scaled_float/10_basic.yml (100%) rename modules/mapper-extras/src/{test => yamlRestTest}/resources/rest-api-spec/test/search-as-you-type/10_basic.yml (100%) rename modules/mapper-extras/src/{test => yamlRestTest}/resources/rest-api-spec/test/search-as-you-type/20_highlighting.yml (100%) rename modules/parent-join/src/{test => yamlRestTest}/java/org/elasticsearch/join/ParentChildClientYamlTestSuiteIT.java (100%) rename modules/parent-join/src/{test => yamlRestTest}/resources/rest-api-spec/test/11_parent_child.yml (100%) rename modules/parent-join/src/{test => yamlRestTest}/resources/rest-api-spec/test/20_parent_join.yml (100%) rename modules/parent-join/src/{test => yamlRestTest}/resources/rest-api-spec/test/30_inner_hits.yml (100%) rename modules/percolator/src/{test => yamlRestTest}/java/org/elasticsearch/percolator/PercolatorClientYamlTestSuiteIT.java (100%) rename modules/percolator/src/{test => yamlRestTest}/resources/rest-api-spec/test/10_basic.yml (100%) rename modules/rank-eval/src/{test => yamlRestTest}/java/org/elasticsearch/index/rankeval/RankEvalYamlIT.java (100%) rename modules/rank-eval/src/{test => yamlRestTest}/resources/rest-api-spec/test/rank_eval/10_basic.yml (100%) rename modules/rank-eval/src/{test => yamlRestTest}/resources/rest-api-spec/test/rank_eval/20_dcg.yml (100%) rename modules/rank-eval/src/{test => yamlRestTest}/resources/rest-api-spec/test/rank_eval/30_failures.yml (100%) rename modules/rank-eval/src/{test => yamlRestTest}/resources/rest-api-spec/test/rank_eval/40_rank_eval_templated.yml (100%) rename modules/reindex/src/{test => yamlRestTest}/java/org/elasticsearch/index/reindex/ReindexClientYamlTestSuiteIT.java (100%) rename modules/reindex/src/{test => yamlRestTest}/resources/rest-api-spec/test/delete_by_query/10_basic.yml (100%) rename modules/reindex/src/{test => yamlRestTest}/resources/rest-api-spec/test/delete_by_query/20_validation.yml (100%) rename modules/reindex/src/{test => yamlRestTest}/resources/rest-api-spec/test/delete_by_query/40_versioning.yml (100%) rename modules/reindex/src/{test => yamlRestTest}/resources/rest-api-spec/test/delete_by_query/50_wait_for_active_shards.yml (100%) rename modules/reindex/src/{test => yamlRestTest}/resources/rest-api-spec/test/delete_by_query/70_throttle.yml (100%) rename modules/reindex/src/{test => yamlRestTest}/resources/rest-api-spec/test/delete_by_query/80_slices.yml (100%) rename modules/reindex/src/{test => yamlRestTest}/resources/rest-api-spec/test/reindex/10_basic.yml (100%) rename modules/reindex/src/{test => yamlRestTest}/resources/rest-api-spec/test/reindex/20_validation.yml (100%) rename modules/reindex/src/{test => yamlRestTest}/resources/rest-api-spec/test/reindex/25_no_auto_create.yml (100%) rename modules/reindex/src/{test => yamlRestTest}/resources/rest-api-spec/test/reindex/30_search.yml (100%) rename modules/reindex/src/{test => yamlRestTest}/resources/rest-api-spec/test/reindex/35_search_failures.yml (100%) rename modules/reindex/src/{test => yamlRestTest}/resources/rest-api-spec/test/reindex/40_versioning.yml (100%) rename modules/reindex/src/{test => yamlRestTest}/resources/rest-api-spec/test/reindex/50_routing.yml (100%) rename modules/reindex/src/{test => yamlRestTest}/resources/rest-api-spec/test/reindex/60_wait_for_active_shards.yml (100%) rename modules/reindex/src/{test => yamlRestTest}/resources/rest-api-spec/test/reindex/70_throttle.yml (100%) rename modules/reindex/src/{test => yamlRestTest}/resources/rest-api-spec/test/reindex/80_slices.yml (100%) rename modules/reindex/src/{test => yamlRestTest}/resources/rest-api-spec/test/reindex/85_scripting.yml (100%) rename modules/reindex/src/{test => yamlRestTest}/resources/rest-api-spec/test/reindex/90_remote.yml (100%) rename modules/reindex/src/{test => yamlRestTest}/resources/rest-api-spec/test/reindex/95_parent_join.yml (100%) rename modules/reindex/src/{test => yamlRestTest}/resources/rest-api-spec/test/update_by_query/10_basic.yml (100%) rename modules/reindex/src/{test => yamlRestTest}/resources/rest-api-spec/test/update_by_query/20_validation.yml (100%) rename modules/reindex/src/{test => yamlRestTest}/resources/rest-api-spec/test/update_by_query/30_new_fields.yml (100%) rename modules/reindex/src/{test => yamlRestTest}/resources/rest-api-spec/test/update_by_query/35_search_failure.yml (100%) rename modules/reindex/src/{test => yamlRestTest}/resources/rest-api-spec/test/update_by_query/40_versioning.yml (100%) rename modules/reindex/src/{test => yamlRestTest}/resources/rest-api-spec/test/update_by_query/50_consistency.yml (100%) rename modules/reindex/src/{test => yamlRestTest}/resources/rest-api-spec/test/update_by_query/60_throttle.yml (100%) rename modules/reindex/src/{test => yamlRestTest}/resources/rest-api-spec/test/update_by_query/70_slices.yml (100%) rename modules/reindex/src/{test => yamlRestTest}/resources/rest-api-spec/test/update_by_query/80_scripting.yml (100%) rename modules/repository-url/src/{test/java/org/elasticsearch/repositories/url/URLSnapshotRestoreTests.java => internalClusterTest/java/org/elasticsearch/repositories/url/URLSnapshotRestoreIT.java} (98%) rename modules/repository-url/src/{test => yamlRestTest}/java/org/elasticsearch/repositories/url/RepositoryURLClientYamlTestSuiteIT.java (99%) rename modules/repository-url/src/{test => yamlRestTest}/resources/rest-api-spec/test/repository_url/10_basic.yml (100%) rename modules/repository-url/src/{test => yamlRestTest}/resources/rest-api-spec/test/repository_url/20_repository.yml (100%) rename modules/transport-netty4/src/{test => yamlRestTest}/java/org/elasticsearch/http/netty4/Netty4ClientYamlTestSuiteIT.java (100%) rename modules/transport-netty4/src/{test => yamlRestTest}/resources/rest-api-spec/test/10_basic.yml (100%) diff --git a/modules/aggs-matrix-stats/build.gradle b/modules/aggs-matrix-stats/build.gradle index 705dda76f5c..eb4aa9fc62c 100644 --- a/modules/aggs-matrix-stats/build.gradle +++ b/modules/aggs-matrix-stats/build.gradle @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -apply plugin: 'elasticsearch.rest-resources' +apply plugin: 'elasticsearch.yaml-rest-test' esplugin { description 'Adds aggregations whose input are a list of numeric fields and output includes a matrix.' @@ -29,3 +29,5 @@ restResources { includeCore '_common', 'indices', 'cluster', 'index', 'search', 'nodes' } } + +integTest.enabled = false diff --git a/modules/aggs-matrix-stats/src/test/java/org/elasticsearch/search/aggregations/matrix/MatrixStatsClientYamlTestSuiteIT.java b/modules/aggs-matrix-stats/src/yamlRestTest/java/org/elasticsearch/search/aggregations/matrix/MatrixStatsClientYamlTestSuiteIT.java similarity index 100% rename from modules/aggs-matrix-stats/src/test/java/org/elasticsearch/search/aggregations/matrix/MatrixStatsClientYamlTestSuiteIT.java rename to modules/aggs-matrix-stats/src/yamlRestTest/java/org/elasticsearch/search/aggregations/matrix/MatrixStatsClientYamlTestSuiteIT.java diff --git a/modules/aggs-matrix-stats/src/test/resources/rest-api-spec/test/stats/10_basic.yml b/modules/aggs-matrix-stats/src/yamlRestTest/resources/rest-api-spec/test/stats/10_basic.yml similarity index 100% rename from modules/aggs-matrix-stats/src/test/resources/rest-api-spec/test/stats/10_basic.yml rename to modules/aggs-matrix-stats/src/yamlRestTest/resources/rest-api-spec/test/stats/10_basic.yml diff --git a/modules/aggs-matrix-stats/src/test/resources/rest-api-spec/test/stats/20_empty_bucket.yml b/modules/aggs-matrix-stats/src/yamlRestTest/resources/rest-api-spec/test/stats/20_empty_bucket.yml similarity index 100% rename from modules/aggs-matrix-stats/src/test/resources/rest-api-spec/test/stats/20_empty_bucket.yml rename to modules/aggs-matrix-stats/src/yamlRestTest/resources/rest-api-spec/test/stats/20_empty_bucket.yml diff --git a/modules/aggs-matrix-stats/src/test/resources/rest-api-spec/test/stats/30_single_value_field.yml b/modules/aggs-matrix-stats/src/yamlRestTest/resources/rest-api-spec/test/stats/30_single_value_field.yml similarity index 100% rename from modules/aggs-matrix-stats/src/test/resources/rest-api-spec/test/stats/30_single_value_field.yml rename to modules/aggs-matrix-stats/src/yamlRestTest/resources/rest-api-spec/test/stats/30_single_value_field.yml diff --git a/modules/aggs-matrix-stats/src/test/resources/rest-api-spec/test/stats/40_multi_value_field.yml b/modules/aggs-matrix-stats/src/yamlRestTest/resources/rest-api-spec/test/stats/40_multi_value_field.yml similarity index 100% rename from modules/aggs-matrix-stats/src/test/resources/rest-api-spec/test/stats/40_multi_value_field.yml rename to modules/aggs-matrix-stats/src/yamlRestTest/resources/rest-api-spec/test/stats/40_multi_value_field.yml diff --git a/modules/analysis-common/build.gradle b/modules/analysis-common/build.gradle index 4af7cf09b4c..f631aa725d0 100644 --- a/modules/analysis-common/build.gradle +++ b/modules/analysis-common/build.gradle @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -apply plugin: 'elasticsearch.rest-resources' +apply plugin: 'elasticsearch.yaml-rest-test' esplugin { description 'Adds "built in" analyzers to Elasticsearch.' diff --git a/modules/analysis-common/src/test/java/org/elasticsearch/analysis/common/QueryStringWithAnalyzersTests.java b/modules/analysis-common/src/test/java/org/elasticsearch/analysis/common/QueryStringWithAnalyzersIT.java similarity index 98% rename from modules/analysis-common/src/test/java/org/elasticsearch/analysis/common/QueryStringWithAnalyzersTests.java rename to modules/analysis-common/src/test/java/org/elasticsearch/analysis/common/QueryStringWithAnalyzersIT.java index fb04ee59a7c..37a04f8199d 100644 --- a/modules/analysis-common/src/test/java/org/elasticsearch/analysis/common/QueryStringWithAnalyzersTests.java +++ b/modules/analysis-common/src/test/java/org/elasticsearch/analysis/common/QueryStringWithAnalyzersIT.java @@ -32,7 +32,7 @@ import static org.elasticsearch.index.query.QueryBuilders.queryStringQuery; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -public class QueryStringWithAnalyzersTests extends ESIntegTestCase { +public class QueryStringWithAnalyzersIT extends ESIntegTestCase { @Override protected Collection> nodePlugins() { return Arrays.asList(CommonAnalysisPlugin.class); diff --git a/modules/analysis-common/src/test/java/org/elasticsearch/analysis/common/CommonAnalysisClientYamlTestSuiteIT.java b/modules/analysis-common/src/yamlRestTest/java/org/elasticsearch/analysis/common/CommonAnalysisClientYamlTestSuiteIT.java similarity index 100% rename from modules/analysis-common/src/test/java/org/elasticsearch/analysis/common/CommonAnalysisClientYamlTestSuiteIT.java rename to modules/analysis-common/src/yamlRestTest/java/org/elasticsearch/analysis/common/CommonAnalysisClientYamlTestSuiteIT.java diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/analysis-common/10_basic.yml b/modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/analysis-common/10_basic.yml similarity index 100% rename from modules/analysis-common/src/test/resources/rest-api-spec/test/analysis-common/10_basic.yml rename to modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/analysis-common/10_basic.yml diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/analysis-common/20_analyzers.yml b/modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/analysis-common/20_analyzers.yml similarity index 100% rename from modules/analysis-common/src/test/resources/rest-api-spec/test/analysis-common/20_analyzers.yml rename to modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/analysis-common/20_analyzers.yml diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/analysis-common/30_tokenizers.yml b/modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/analysis-common/30_tokenizers.yml similarity index 100% rename from modules/analysis-common/src/test/resources/rest-api-spec/test/analysis-common/30_tokenizers.yml rename to modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/analysis-common/30_tokenizers.yml diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/analysis-common/40_token_filters.yml b/modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/analysis-common/40_token_filters.yml similarity index 100% rename from modules/analysis-common/src/test/resources/rest-api-spec/test/analysis-common/40_token_filters.yml rename to modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/analysis-common/40_token_filters.yml diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/analysis-common/50_char_filters.yml b/modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/analysis-common/50_char_filters.yml similarity index 100% rename from modules/analysis-common/src/test/resources/rest-api-spec/test/analysis-common/50_char_filters.yml rename to modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/analysis-common/50_char_filters.yml diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/analysis-common/60_analysis_scripting.yml b/modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/analysis-common/60_analysis_scripting.yml similarity index 100% rename from modules/analysis-common/src/test/resources/rest-api-spec/test/analysis-common/60_analysis_scripting.yml rename to modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/analysis-common/60_analysis_scripting.yml diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/cluster.stats/10_analysis_stats.yml b/modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/cluster.stats/10_analysis_stats.yml similarity index 100% rename from modules/analysis-common/src/test/resources/rest-api-spec/test/cluster.stats/10_analysis_stats.yml rename to modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/cluster.stats/10_analysis_stats.yml diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/indices.analyze/10_analyze.yml b/modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/indices.analyze/10_analyze.yml similarity index 100% rename from modules/analysis-common/src/test/resources/rest-api-spec/test/indices.analyze/10_analyze.yml rename to modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/indices.analyze/10_analyze.yml diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/indices.analyze/10_synonyms.yml b/modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/indices.analyze/10_synonyms.yml similarity index 100% rename from modules/analysis-common/src/test/resources/rest-api-spec/test/indices.analyze/10_synonyms.yml rename to modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/indices.analyze/10_synonyms.yml diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/indices/validate_query/10_synonyms.yml b/modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/indices/validate_query/10_synonyms.yml similarity index 100% rename from modules/analysis-common/src/test/resources/rest-api-spec/test/indices/validate_query/10_synonyms.yml rename to modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/indices/validate_query/10_synonyms.yml diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/10_match.yml b/modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/search.query/10_match.yml similarity index 100% rename from modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/10_match.yml rename to modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/search.query/10_match.yml diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/20_ngram_search.yml b/modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/search.query/20_ngram_search.yml similarity index 100% rename from modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/20_ngram_search.yml rename to modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/search.query/20_ngram_search.yml diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/30_ngram_highligthing.yml b/modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/search.query/30_ngram_highligthing.yml similarity index 100% rename from modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/30_ngram_highligthing.yml rename to modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/search.query/30_ngram_highligthing.yml diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/40_query_string.yml b/modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/search.query/40_query_string.yml similarity index 100% rename from modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/40_query_string.yml rename to modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/search.query/40_query_string.yml diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/50_queries_with_synonyms.yml b/modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/search.query/50_queries_with_synonyms.yml similarity index 100% rename from modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/50_queries_with_synonyms.yml rename to modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/search.query/50_queries_with_synonyms.yml diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/60_synonym_graph.yml b/modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/search.query/60_synonym_graph.yml similarity index 100% rename from modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/60_synonym_graph.yml rename to modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/search.query/60_synonym_graph.yml diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/70_intervals.yml b/modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/search.query/70_intervals.yml similarity index 100% rename from modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/70_intervals.yml rename to modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/search.query/70_intervals.yml diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/search.suggest/20_phrase.yml b/modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/search.suggest/20_phrase.yml similarity index 100% rename from modules/analysis-common/src/test/resources/rest-api-spec/test/search.suggest/20_phrase.yml rename to modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/search.suggest/20_phrase.yml diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/search.suggest/30_synonyms.yml b/modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/search.suggest/30_synonyms.yml similarity index 100% rename from modules/analysis-common/src/test/resources/rest-api-spec/test/search.suggest/30_synonyms.yml rename to modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/search.suggest/30_synonyms.yml diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/termvectors/10_payloads.yml b/modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/termvectors/10_payloads.yml similarity index 100% rename from modules/analysis-common/src/test/resources/rest-api-spec/test/termvectors/10_payloads.yml rename to modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/termvectors/10_payloads.yml diff --git a/modules/geo/build.gradle b/modules/geo/build.gradle index e0f5147df8b..c089b395df0 100644 --- a/modules/geo/build.gradle +++ b/modules/geo/build.gradle @@ -16,13 +16,21 @@ * specific language governing permissions and limitations * under the License. */ -apply plugin: 'elasticsearch.rest-resources' +apply plugin: 'elasticsearch.yaml-rest-test' esplugin { description 'Placeholder plugin for geospatial features in ES. only registers geo_shape field mapper for now' classname 'org.elasticsearch.geo.GeoPlugin' } -artifacts { - restTests(new File(projectDir, "src/test/resources/rest-api-spec/test")) +restResources { + restApi { + includeCore '_common', 'indices', 'index', 'search' + } } +artifacts { + restTests(project.file('src/yamlRestTest/resources/rest-api-spec/test')) +} + +integTest.enabled = false +test.enabled = false diff --git a/modules/geo/src/test/java/org/elasticsearch/geo/GeoTests.java b/modules/geo/src/test/java/org/elasticsearch/geo/GeoTests.java deleted file mode 100644 index 056b4853930..00000000000 --- a/modules/geo/src/test/java/org/elasticsearch/geo/GeoTests.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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. - */ -package org.elasticsearch.geo; - -import org.elasticsearch.test.ESTestCase; - -public class GeoTests extends ESTestCase { - - public void testStub() { - // the build expects unit tests to exist in a module, so here one is. - } -} diff --git a/modules/geo/src/test/java/org/elasticsearch/geo/GeoClientYamlTestSuiteIT.java b/modules/geo/src/yamlRestTest/java/org/elasticsearch/geo/GeoClientYamlTestSuiteIT.java similarity index 100% rename from modules/geo/src/test/java/org/elasticsearch/geo/GeoClientYamlTestSuiteIT.java rename to modules/geo/src/yamlRestTest/java/org/elasticsearch/geo/GeoClientYamlTestSuiteIT.java diff --git a/modules/geo/src/test/resources/rest-api-spec/test/geo_shape/10_basic.yml b/modules/geo/src/yamlRestTest/resources/rest-api-spec/test/geo_shape/10_basic.yml similarity index 100% rename from modules/geo/src/test/resources/rest-api-spec/test/geo_shape/10_basic.yml rename to modules/geo/src/yamlRestTest/resources/rest-api-spec/test/geo_shape/10_basic.yml diff --git a/modules/ingest-common/build.gradle b/modules/ingest-common/build.gradle index 3026670bb33..2edf77c0c97 100644 --- a/modules/ingest-common/build.gradle +++ b/modules/ingest-common/build.gradle @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -apply plugin: 'elasticsearch.rest-resources' +apply plugin: 'elasticsearch.yaml-rest-test' esplugin { description 'Module for ingest processors that do not require additional security permissions or have large dependencies and resources' @@ -36,7 +36,7 @@ restResources { } } -testClusters.integTest { +testClusters.all { // Needed in order to test ingest pipeline templating: // (this is because the integTest node is not using default distribution, but only the minimal number of required modules) module project(':modules:lang-mustache').tasks.bundlePlugin.archiveFile diff --git a/modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/IngestCommonClientYamlTestSuiteIT.java b/modules/ingest-common/src/yamlRestTest/java/org/elasticsearch/ingest/common/IngestCommonClientYamlTestSuiteIT.java similarity index 100% rename from modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/IngestCommonClientYamlTestSuiteIT.java rename to modules/ingest-common/src/yamlRestTest/java/org/elasticsearch/ingest/common/IngestCommonClientYamlTestSuiteIT.java diff --git a/modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/100_date_index_name_processor.yml b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/100_date_index_name_processor.yml similarity index 100% rename from modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/100_date_index_name_processor.yml rename to modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/100_date_index_name_processor.yml diff --git a/modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/10_basic.yml b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/10_basic.yml similarity index 100% rename from modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/10_basic.yml rename to modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/10_basic.yml diff --git a/modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/110_sort.yml b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/110_sort.yml similarity index 100% rename from modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/110_sort.yml rename to modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/110_sort.yml diff --git a/modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/120_grok.yml b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/120_grok.yml similarity index 100% rename from modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/120_grok.yml rename to modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/120_grok.yml diff --git a/modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/130_escape_dot.yml b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/130_escape_dot.yml similarity index 100% rename from modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/130_escape_dot.yml rename to modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/130_escape_dot.yml diff --git a/modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/140_json.yml b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/140_json.yml similarity index 100% rename from modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/140_json.yml rename to modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/140_json.yml diff --git a/modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/150_kv.yml b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/150_kv.yml similarity index 100% rename from modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/150_kv.yml rename to modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/150_kv.yml diff --git a/modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/160_urldecode.yml b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/160_urldecode.yml similarity index 100% rename from modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/160_urldecode.yml rename to modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/160_urldecode.yml diff --git a/modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/170_version.yml b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/170_version.yml similarity index 100% rename from modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/170_version.yml rename to modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/170_version.yml diff --git a/modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/180_bytes_processor.yml b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/180_bytes_processor.yml similarity index 100% rename from modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/180_bytes_processor.yml rename to modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/180_bytes_processor.yml diff --git a/modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/190_script_processor.yml b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/190_script_processor.yml similarity index 100% rename from modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/190_script_processor.yml rename to modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/190_script_processor.yml diff --git a/modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/200_default_pipeline.yml b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/200_default_pipeline.yml similarity index 100% rename from modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/200_default_pipeline.yml rename to modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/200_default_pipeline.yml diff --git a/modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/200_dissect_processor.yml b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/200_dissect_processor.yml similarity index 100% rename from modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/200_dissect_processor.yml rename to modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/200_dissect_processor.yml diff --git a/modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/20_crud.yml b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/20_crud.yml similarity index 100% rename from modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/20_crud.yml rename to modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/20_crud.yml diff --git a/modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/210_conditional_processor.yml b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/210_conditional_processor.yml similarity index 100% rename from modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/210_conditional_processor.yml rename to modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/210_conditional_processor.yml diff --git a/modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/210_pipeline_processor.yml b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/210_pipeline_processor.yml similarity index 100% rename from modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/210_pipeline_processor.yml rename to modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/210_pipeline_processor.yml diff --git a/modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/220_drop_processor.yml b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/220_drop_processor.yml similarity index 100% rename from modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/220_drop_processor.yml rename to modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/220_drop_processor.yml diff --git a/modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/230_change_target_index.yml b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/230_change_target_index.yml similarity index 100% rename from modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/230_change_target_index.yml rename to modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/230_change_target_index.yml diff --git a/modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/240_required_pipeline.yml b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/240_required_pipeline.yml similarity index 100% rename from modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/240_required_pipeline.yml rename to modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/240_required_pipeline.yml diff --git a/modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/250_csv.yml b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/250_csv.yml similarity index 100% rename from modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/250_csv.yml rename to modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/250_csv.yml diff --git a/modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/260_seq_no.yml b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/260_seq_no.yml similarity index 100% rename from modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/260_seq_no.yml rename to modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/260_seq_no.yml diff --git a/modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/270_set_processor.yml b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/270_set_processor.yml similarity index 100% rename from modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/270_set_processor.yml rename to modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/270_set_processor.yml diff --git a/modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/30_date_processor.yml b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/30_date_processor.yml similarity index 100% rename from modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/30_date_processor.yml rename to modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/30_date_processor.yml diff --git a/modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/40_mutate.yml b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/40_mutate.yml similarity index 100% rename from modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/40_mutate.yml rename to modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/40_mutate.yml diff --git a/modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/50_on_failure.yml b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/50_on_failure.yml similarity index 100% rename from modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/50_on_failure.yml rename to modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/50_on_failure.yml diff --git a/modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/60_fail.yml b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/60_fail.yml similarity index 100% rename from modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/60_fail.yml rename to modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/60_fail.yml diff --git a/modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/70_bulk.yml b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/70_bulk.yml similarity index 100% rename from modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/70_bulk.yml rename to modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/70_bulk.yml diff --git a/modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/80_foreach.yml b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/80_foreach.yml similarity index 100% rename from modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/80_foreach.yml rename to modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/80_foreach.yml diff --git a/modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/90_simulate.yml b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/90_simulate.yml similarity index 100% rename from modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/90_simulate.yml rename to modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/90_simulate.yml diff --git a/modules/ingest-geoip/build.gradle b/modules/ingest-geoip/build.gradle index f1e26b8dabc..f0d5bf95dd0 100644 --- a/modules/ingest-geoip/build.gradle +++ b/modules/ingest-geoip/build.gradle @@ -19,7 +19,8 @@ import org.apache.tools.ant.taskdefs.condition.Os -apply plugin: 'elasticsearch.rest-resources' +apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-cluster-test' esplugin { description 'Ingest processor that uses looksup geo data based on ip adresses using the Maxmind geo database' @@ -42,6 +43,8 @@ restResources { } } +integTest.enabled = false + task copyDefaultGeoIp2DatabaseFiles(type: Copy) { from { zipTree(configurations.testCompileClasspath.files.find { it.name.contains('geolite2-databases') }) } into "${project.buildDir}/ingest-geoip" diff --git a/modules/ingest-geoip/src/test/java/org/elasticsearch/ingest/geoip/GeoIpProcessorNonIngestNodeTests.java b/modules/ingest-geoip/src/internalClusterTest/java/org/elasticsearch/ingest/geoip/GeoIpProcessorNonIngestNodeIT.java similarity index 99% rename from modules/ingest-geoip/src/test/java/org/elasticsearch/ingest/geoip/GeoIpProcessorNonIngestNodeTests.java rename to modules/ingest-geoip/src/internalClusterTest/java/org/elasticsearch/ingest/geoip/GeoIpProcessorNonIngestNodeIT.java index c12e620e882..011ae5121bf 100644 --- a/modules/ingest-geoip/src/test/java/org/elasticsearch/ingest/geoip/GeoIpProcessorNonIngestNodeTests.java +++ b/modules/ingest-geoip/src/internalClusterTest/java/org/elasticsearch/ingest/geoip/GeoIpProcessorNonIngestNodeIT.java @@ -50,7 +50,7 @@ import static org.elasticsearch.test.NodeRoles.nonIngestNode; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; -public class GeoIpProcessorNonIngestNodeTests extends ESIntegTestCase { +public class GeoIpProcessorNonIngestNodeIT extends ESIntegTestCase { public static class IngestGeoIpSettingsPlugin extends Plugin { diff --git a/modules/ingest-geoip/src/test/java/org/elasticsearch/ingest/geoip/IngestGeoIpClientYamlTestSuiteIT.java b/modules/ingest-geoip/src/yamlRestTest/java/org/elasticsearch/ingest/geoip/IngestGeoIpClientYamlTestSuiteIT.java similarity index 100% rename from modules/ingest-geoip/src/test/java/org/elasticsearch/ingest/geoip/IngestGeoIpClientYamlTestSuiteIT.java rename to modules/ingest-geoip/src/yamlRestTest/java/org/elasticsearch/ingest/geoip/IngestGeoIpClientYamlTestSuiteIT.java diff --git a/modules/ingest-geoip/src/test/resources/rest-api-spec/test/ingest_geoip/10_basic.yml b/modules/ingest-geoip/src/yamlRestTest/resources/rest-api-spec/test/ingest_geoip/10_basic.yml similarity index 100% rename from modules/ingest-geoip/src/test/resources/rest-api-spec/test/ingest_geoip/10_basic.yml rename to modules/ingest-geoip/src/yamlRestTest/resources/rest-api-spec/test/ingest_geoip/10_basic.yml diff --git a/modules/ingest-geoip/src/test/resources/rest-api-spec/test/ingest_geoip/20_geoip_processor.yml b/modules/ingest-geoip/src/yamlRestTest/resources/rest-api-spec/test/ingest_geoip/20_geoip_processor.yml similarity index 100% rename from modules/ingest-geoip/src/test/resources/rest-api-spec/test/ingest_geoip/20_geoip_processor.yml rename to modules/ingest-geoip/src/yamlRestTest/resources/rest-api-spec/test/ingest_geoip/20_geoip_processor.yml diff --git a/modules/ingest-user-agent/build.gradle b/modules/ingest-user-agent/build.gradle index 9b12ab11df7..3d38ea99995 100644 --- a/modules/ingest-user-agent/build.gradle +++ b/modules/ingest-user-agent/build.gradle @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -apply plugin: 'elasticsearch.rest-resources' +apply plugin: 'elasticsearch.yaml-rest-test' esplugin { description 'Ingest processor that extracts information from a user agent' @@ -29,6 +29,8 @@ restResources { } } -testClusters.integTest { +testClusters.all { extraConfigFile 'ingest-user-agent/test-regexes.yml', file('src/test/test-regexes.yml') } + +integTest.enabled = false diff --git a/modules/ingest-user-agent/src/test/java/org/elasticsearch/ingest/useragent/IngestUserAgentClientYamlTestSuiteIT.java b/modules/ingest-user-agent/src/yamlRestTest/java/org/elasticsearch/ingest/useragent/IngestUserAgentClientYamlTestSuiteIT.java similarity index 100% rename from modules/ingest-user-agent/src/test/java/org/elasticsearch/ingest/useragent/IngestUserAgentClientYamlTestSuiteIT.java rename to modules/ingest-user-agent/src/yamlRestTest/java/org/elasticsearch/ingest/useragent/IngestUserAgentClientYamlTestSuiteIT.java diff --git a/modules/ingest-user-agent/src/test/resources/rest-api-spec/test/ingest-useragent/10_basic.yml b/modules/ingest-user-agent/src/yamlRestTest/resources/rest-api-spec/test/ingest-useragent/10_basic.yml similarity index 100% rename from modules/ingest-user-agent/src/test/resources/rest-api-spec/test/ingest-useragent/10_basic.yml rename to modules/ingest-user-agent/src/yamlRestTest/resources/rest-api-spec/test/ingest-useragent/10_basic.yml diff --git a/modules/ingest-user-agent/src/test/resources/rest-api-spec/test/ingest-useragent/20_useragent_processor.yml b/modules/ingest-user-agent/src/yamlRestTest/resources/rest-api-spec/test/ingest-useragent/20_useragent_processor.yml similarity index 100% rename from modules/ingest-user-agent/src/test/resources/rest-api-spec/test/ingest-useragent/20_useragent_processor.yml rename to modules/ingest-user-agent/src/yamlRestTest/resources/rest-api-spec/test/ingest-useragent/20_useragent_processor.yml diff --git a/modules/ingest-user-agent/src/test/resources/rest-api-spec/test/ingest-useragent/30_custom_regex.yml b/modules/ingest-user-agent/src/yamlRestTest/resources/rest-api-spec/test/ingest-useragent/30_custom_regex.yml similarity index 100% rename from modules/ingest-user-agent/src/test/resources/rest-api-spec/test/ingest-useragent/30_custom_regex.yml rename to modules/ingest-user-agent/src/yamlRestTest/resources/rest-api-spec/test/ingest-useragent/30_custom_regex.yml diff --git a/modules/lang-expression/build.gradle b/modules/lang-expression/build.gradle index 41b31a65fd4..3b8c42fea93 100644 --- a/modules/lang-expression/build.gradle +++ b/modules/lang-expression/build.gradle @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -apply plugin: 'elasticsearch.rest-resources' +apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-cluster-test' esplugin { description 'Lucene expressions integration for Elasticsearch' @@ -36,6 +37,8 @@ restResources { } } +integTest.enabled = false + tasks.named("dependencyLicenses").configure { mapping from: /lucene-.*/, to: 'lucene' mapping from: /asm-.*/, to: 'asm' diff --git a/modules/lang-expression/src/test/java/org/elasticsearch/script/expression/MoreExpressionTests.java b/modules/lang-expression/src/internalClusterTest/java/org/elasticsearch/script/expression/MoreExpressionIT.java similarity index 99% rename from modules/lang-expression/src/test/java/org/elasticsearch/script/expression/MoreExpressionTests.java rename to modules/lang-expression/src/internalClusterTest/java/org/elasticsearch/script/expression/MoreExpressionIT.java index 40ddeac099d..e62307b7746 100644 --- a/modules/lang-expression/src/test/java/org/elasticsearch/script/expression/MoreExpressionTests.java +++ b/modules/lang-expression/src/internalClusterTest/java/org/elasticsearch/script/expression/MoreExpressionIT.java @@ -61,7 +61,7 @@ import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.notNullValue; // TODO: please convert to unit tests! -public class MoreExpressionTests extends ESIntegTestCase { +public class MoreExpressionIT extends ESIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/modules/lang-expression/src/test/java/org/elasticsearch/script/expression/StoredExpressionTests.java b/modules/lang-expression/src/internalClusterTest/java/org/elasticsearch/script/expression/StoredExpressionIT.java similarity index 98% rename from modules/lang-expression/src/test/java/org/elasticsearch/script/expression/StoredExpressionTests.java rename to modules/lang-expression/src/internalClusterTest/java/org/elasticsearch/script/expression/StoredExpressionIT.java index 7f7f30f271a..2dbc992f641 100644 --- a/modules/lang-expression/src/test/java/org/elasticsearch/script/expression/StoredExpressionTests.java +++ b/modules/lang-expression/src/internalClusterTest/java/org/elasticsearch/script/expression/StoredExpressionIT.java @@ -36,7 +36,7 @@ import java.util.Collections; import static org.hamcrest.Matchers.containsString; //TODO: please convert to unit tests! -public class StoredExpressionTests extends ESIntegTestCase { +public class StoredExpressionIT extends ESIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { Settings.Builder builder = Settings.builder().put(super.nodeSettings(nodeOrdinal)); diff --git a/modules/lang-expression/src/test/java/org/elasticsearch/script/expression/LangExpressionClientYamlTestSuiteIT.java b/modules/lang-expression/src/yamlRestTest/java/org/elasticsearch/script/expression/LangExpressionClientYamlTestSuiteIT.java similarity index 100% rename from modules/lang-expression/src/test/java/org/elasticsearch/script/expression/LangExpressionClientYamlTestSuiteIT.java rename to modules/lang-expression/src/yamlRestTest/java/org/elasticsearch/script/expression/LangExpressionClientYamlTestSuiteIT.java diff --git a/modules/lang-expression/src/test/resources/rest-api-spec/test/lang_expression/10_basic.yml b/modules/lang-expression/src/yamlRestTest/resources/rest-api-spec/test/lang_expression/10_basic.yml similarity index 100% rename from modules/lang-expression/src/test/resources/rest-api-spec/test/lang_expression/10_basic.yml rename to modules/lang-expression/src/yamlRestTest/resources/rest-api-spec/test/lang_expression/10_basic.yml diff --git a/modules/lang-expression/src/test/resources/rest-api-spec/test/lang_expression/20_search.yml b/modules/lang-expression/src/yamlRestTest/resources/rest-api-spec/test/lang_expression/20_search.yml similarity index 100% rename from modules/lang-expression/src/test/resources/rest-api-spec/test/lang_expression/20_search.yml rename to modules/lang-expression/src/yamlRestTest/resources/rest-api-spec/test/lang_expression/20_search.yml diff --git a/modules/lang-mustache/build.gradle b/modules/lang-mustache/build.gradle index f8a3920cffc..e71ce215fdf 100644 --- a/modules/lang-mustache/build.gradle +++ b/modules/lang-mustache/build.gradle @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -apply plugin: 'elasticsearch.rest-resources' +apply plugin: 'elasticsearch.yaml-rest-test' esplugin { description 'Mustache scripting integration for Elasticsearch' diff --git a/modules/lang-mustache/src/test/java/org/elasticsearch/script/mustache/LangMustacheClientYamlTestSuiteIT.java b/modules/lang-mustache/src/yamlRestTest/java/org/elasticsearch/script/mustache/LangMustacheClientYamlTestSuiteIT.java similarity index 100% rename from modules/lang-mustache/src/test/java/org/elasticsearch/script/mustache/LangMustacheClientYamlTestSuiteIT.java rename to modules/lang-mustache/src/yamlRestTest/java/org/elasticsearch/script/mustache/LangMustacheClientYamlTestSuiteIT.java diff --git a/modules/lang-mustache/src/test/resources/rest-api-spec/test/lang_mustache/10_basic.yml b/modules/lang-mustache/src/yamlRestTest/resources/rest-api-spec/test/lang_mustache/10_basic.yml similarity index 100% rename from modules/lang-mustache/src/test/resources/rest-api-spec/test/lang_mustache/10_basic.yml rename to modules/lang-mustache/src/yamlRestTest/resources/rest-api-spec/test/lang_mustache/10_basic.yml diff --git a/modules/lang-mustache/src/test/resources/rest-api-spec/test/lang_mustache/20_render_search_template.yml b/modules/lang-mustache/src/yamlRestTest/resources/rest-api-spec/test/lang_mustache/20_render_search_template.yml similarity index 100% rename from modules/lang-mustache/src/test/resources/rest-api-spec/test/lang_mustache/20_render_search_template.yml rename to modules/lang-mustache/src/yamlRestTest/resources/rest-api-spec/test/lang_mustache/20_render_search_template.yml diff --git a/modules/lang-mustache/src/test/resources/rest-api-spec/test/lang_mustache/25_custom_functions.yml b/modules/lang-mustache/src/yamlRestTest/resources/rest-api-spec/test/lang_mustache/25_custom_functions.yml similarity index 100% rename from modules/lang-mustache/src/test/resources/rest-api-spec/test/lang_mustache/25_custom_functions.yml rename to modules/lang-mustache/src/yamlRestTest/resources/rest-api-spec/test/lang_mustache/25_custom_functions.yml diff --git a/modules/lang-mustache/src/test/resources/rest-api-spec/test/lang_mustache/30_search_template.yml b/modules/lang-mustache/src/yamlRestTest/resources/rest-api-spec/test/lang_mustache/30_search_template.yml similarity index 100% rename from modules/lang-mustache/src/test/resources/rest-api-spec/test/lang_mustache/30_search_template.yml rename to modules/lang-mustache/src/yamlRestTest/resources/rest-api-spec/test/lang_mustache/30_search_template.yml diff --git a/modules/lang-mustache/src/test/resources/rest-api-spec/test/lang_mustache/50_multi_search_template.yml b/modules/lang-mustache/src/yamlRestTest/resources/rest-api-spec/test/lang_mustache/50_multi_search_template.yml similarity index 100% rename from modules/lang-mustache/src/test/resources/rest-api-spec/test/lang_mustache/50_multi_search_template.yml rename to modules/lang-mustache/src/yamlRestTest/resources/rest-api-spec/test/lang_mustache/50_multi_search_template.yml diff --git a/modules/lang-mustache/src/test/resources/rest-api-spec/test/lang_mustache/60_typed_keys.yml b/modules/lang-mustache/src/yamlRestTest/resources/rest-api-spec/test/lang_mustache/60_typed_keys.yml similarity index 100% rename from modules/lang-mustache/src/test/resources/rest-api-spec/test/lang_mustache/60_typed_keys.yml rename to modules/lang-mustache/src/yamlRestTest/resources/rest-api-spec/test/lang_mustache/60_typed_keys.yml diff --git a/modules/lang-painless/build.gradle b/modules/lang-painless/build.gradle index 65c0be326df..a8e81471087 100644 --- a/modules/lang-painless/build.gradle +++ b/modules/lang-painless/build.gradle @@ -18,15 +18,15 @@ */ import org.elasticsearch.gradle.testclusters.DefaultTestClustersTask; -apply plugin: 'elasticsearch.rest-resources' apply plugin: 'elasticsearch.validate-rest-spec' +apply plugin: 'elasticsearch.yaml-rest-test' esplugin { description 'An easy, safe and fast scripting language for Elasticsearch' classname 'org.elasticsearch.painless.PainlessPlugin' } -testClusters.integTest { +testClusters.all { module project(':modules:mapper-extras').tasks.bundlePlugin.archiveFile systemProperty 'es.scripting.update.ctx_in_params', 'false' // TODO: remove this once cname is prepended to transport.publish_address by default in 8.0 @@ -54,6 +54,8 @@ restResources { } } +integTest.enabled = false + test { // in WhenThingsGoWrongTests we intentionally generate an out of memory error, this prevents the heap from being dumped to disk jvmArgs '-XX:-OmitStackTraceInFastThrow', '-XX:-HeapDumpOnOutOfMemoryError' diff --git a/modules/lang-painless/src/test/java/org/elasticsearch/painless/LangPainlessClientYamlTestSuiteIT.java b/modules/lang-painless/src/yamlRestTest/java/org/elasticsearch/painless/LangPainlessClientYamlTestSuiteIT.java similarity index 100% rename from modules/lang-painless/src/test/java/org/elasticsearch/painless/LangPainlessClientYamlTestSuiteIT.java rename to modules/lang-painless/src/yamlRestTest/java/org/elasticsearch/painless/LangPainlessClientYamlTestSuiteIT.java diff --git a/modules/lang-painless/src/test/resources/rest-api-spec/api/scripts_painless_context.json b/modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/api/scripts_painless_context.json similarity index 100% rename from modules/lang-painless/src/test/resources/rest-api-spec/api/scripts_painless_context.json rename to modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/api/scripts_painless_context.json diff --git a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/100_terms_agg.yml b/modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/100_terms_agg.yml similarity index 100% rename from modules/lang-painless/src/test/resources/rest-api-spec/test/painless/100_terms_agg.yml rename to modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/100_terms_agg.yml diff --git a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/10_basic.yml b/modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/10_basic.yml similarity index 100% rename from modules/lang-painless/src/test/resources/rest-api-spec/test/painless/10_basic.yml rename to modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/10_basic.yml diff --git a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/110_script_score_boost.yml b/modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/110_script_score_boost.yml similarity index 100% rename from modules/lang-painless/src/test/resources/rest-api-spec/test/painless/110_script_score_boost.yml rename to modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/110_script_score_boost.yml diff --git a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/15_update.yml b/modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/15_update.yml similarity index 100% rename from modules/lang-painless/src/test/resources/rest-api-spec/test/painless/15_update.yml rename to modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/15_update.yml diff --git a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/16_update2.yml b/modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/16_update2.yml similarity index 100% rename from modules/lang-painless/src/test/resources/rest-api-spec/test/painless/16_update2.yml rename to modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/16_update2.yml diff --git a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/17_update_error.yml b/modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/17_update_error.yml similarity index 100% rename from modules/lang-painless/src/test/resources/rest-api-spec/test/painless/17_update_error.yml rename to modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/17_update_error.yml diff --git a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/20_scriptfield.yml b/modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/20_scriptfield.yml similarity index 100% rename from modules/lang-painless/src/test/resources/rest-api-spec/test/painless/20_scriptfield.yml rename to modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/20_scriptfield.yml diff --git a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/25_script_upsert.yml b/modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/25_script_upsert.yml similarity index 100% rename from modules/lang-painless/src/test/resources/rest-api-spec/test/painless/25_script_upsert.yml rename to modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/25_script_upsert.yml diff --git a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/30_search.yml b/modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/30_search.yml similarity index 100% rename from modules/lang-painless/src/test/resources/rest-api-spec/test/painless/30_search.yml rename to modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/30_search.yml diff --git a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/40_disabled.yml b/modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/40_disabled.yml similarity index 100% rename from modules/lang-painless/src/test/resources/rest-api-spec/test/painless/40_disabled.yml rename to modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/40_disabled.yml diff --git a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/50_script_doc_values.yml b/modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/50_script_doc_values.yml similarity index 100% rename from modules/lang-painless/src/test/resources/rest-api-spec/test/painless/50_script_doc_values.yml rename to modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/50_script_doc_values.yml diff --git a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/60_script_doc_values_binary.yml b/modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/60_script_doc_values_binary.yml similarity index 100% rename from modules/lang-painless/src/test/resources/rest-api-spec/test/painless/60_script_doc_values_binary.yml rename to modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/60_script_doc_values_binary.yml diff --git a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/70_execute_painless_scripts.yml b/modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/70_execute_painless_scripts.yml similarity index 100% rename from modules/lang-painless/src/test/resources/rest-api-spec/test/painless/70_execute_painless_scripts.yml rename to modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/70_execute_painless_scripts.yml diff --git a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/70_mov_fn_agg.yml b/modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/70_mov_fn_agg.yml similarity index 100% rename from modules/lang-painless/src/test/resources/rest-api-spec/test/painless/70_mov_fn_agg.yml rename to modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/70_mov_fn_agg.yml diff --git a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/71_context_api.yml b/modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/71_context_api.yml similarity index 100% rename from modules/lang-painless/src/test/resources/rest-api-spec/test/painless/71_context_api.yml rename to modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/71_context_api.yml diff --git a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/80_script_score.yml b/modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/80_script_score.yml similarity index 100% rename from modules/lang-painless/src/test/resources/rest-api-spec/test/painless/80_script_score.yml rename to modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/80_script_score.yml diff --git a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/85_script_score_random_score.yml b/modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/85_script_score_random_score.yml similarity index 100% rename from modules/lang-painless/src/test/resources/rest-api-spec/test/painless/85_script_score_random_score.yml rename to modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/85_script_score_random_score.yml diff --git a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/90_interval_query_filter.yml b/modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/90_interval_query_filter.yml similarity index 100% rename from modules/lang-painless/src/test/resources/rest-api-spec/test/painless/90_interval_query_filter.yml rename to modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/90_interval_query_filter.yml diff --git a/modules/mapper-extras/build.gradle b/modules/mapper-extras/build.gradle index fb5e8a7b03b..b15d0c7f9a3 100644 --- a/modules/mapper-extras/build.gradle +++ b/modules/mapper-extras/build.gradle @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -apply plugin: 'elasticsearch.rest-resources' +apply plugin: 'elasticsearch.yaml-rest-test' esplugin { description 'Adds advanced field mappers' diff --git a/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/MapperExtrasClientYamlTestSuiteIT.java b/modules/mapper-extras/src/yamlRestTest/java/org/elasticsearch/index/mapper/MapperExtrasClientYamlTestSuiteIT.java similarity index 100% rename from modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/MapperExtrasClientYamlTestSuiteIT.java rename to modules/mapper-extras/src/yamlRestTest/java/org/elasticsearch/index/mapper/MapperExtrasClientYamlTestSuiteIT.java diff --git a/modules/mapper-extras/src/test/resources/rest-api-spec/test/rank_feature/10_basic.yml b/modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/rank_feature/10_basic.yml similarity index 100% rename from modules/mapper-extras/src/test/resources/rest-api-spec/test/rank_feature/10_basic.yml rename to modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/rank_feature/10_basic.yml diff --git a/modules/mapper-extras/src/test/resources/rest-api-spec/test/rank_features/10_basic.yml b/modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/rank_features/10_basic.yml similarity index 100% rename from modules/mapper-extras/src/test/resources/rest-api-spec/test/rank_features/10_basic.yml rename to modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/rank_features/10_basic.yml diff --git a/modules/mapper-extras/src/test/resources/rest-api-spec/test/scaled_float/10_basic.yml b/modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/scaled_float/10_basic.yml similarity index 100% rename from modules/mapper-extras/src/test/resources/rest-api-spec/test/scaled_float/10_basic.yml rename to modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/scaled_float/10_basic.yml diff --git a/modules/mapper-extras/src/test/resources/rest-api-spec/test/search-as-you-type/10_basic.yml b/modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/search-as-you-type/10_basic.yml similarity index 100% rename from modules/mapper-extras/src/test/resources/rest-api-spec/test/search-as-you-type/10_basic.yml rename to modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/search-as-you-type/10_basic.yml diff --git a/modules/mapper-extras/src/test/resources/rest-api-spec/test/search-as-you-type/20_highlighting.yml b/modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/search-as-you-type/20_highlighting.yml similarity index 100% rename from modules/mapper-extras/src/test/resources/rest-api-spec/test/search-as-you-type/20_highlighting.yml rename to modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/search-as-you-type/20_highlighting.yml diff --git a/modules/parent-join/build.gradle b/modules/parent-join/build.gradle index 594d81c0740..ab07d943a3e 100644 --- a/modules/parent-join/build.gradle +++ b/modules/parent-join/build.gradle @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -apply plugin: 'elasticsearch.rest-resources' +apply plugin: 'elasticsearch.yaml-rest-test' esplugin { description 'This module adds the support parent-child queries and aggregations' diff --git a/modules/parent-join/src/test/java/org/elasticsearch/join/ParentChildClientYamlTestSuiteIT.java b/modules/parent-join/src/yamlRestTest/java/org/elasticsearch/join/ParentChildClientYamlTestSuiteIT.java similarity index 100% rename from modules/parent-join/src/test/java/org/elasticsearch/join/ParentChildClientYamlTestSuiteIT.java rename to modules/parent-join/src/yamlRestTest/java/org/elasticsearch/join/ParentChildClientYamlTestSuiteIT.java diff --git a/modules/parent-join/src/test/resources/rest-api-spec/test/11_parent_child.yml b/modules/parent-join/src/yamlRestTest/resources/rest-api-spec/test/11_parent_child.yml similarity index 100% rename from modules/parent-join/src/test/resources/rest-api-spec/test/11_parent_child.yml rename to modules/parent-join/src/yamlRestTest/resources/rest-api-spec/test/11_parent_child.yml diff --git a/modules/parent-join/src/test/resources/rest-api-spec/test/20_parent_join.yml b/modules/parent-join/src/yamlRestTest/resources/rest-api-spec/test/20_parent_join.yml similarity index 100% rename from modules/parent-join/src/test/resources/rest-api-spec/test/20_parent_join.yml rename to modules/parent-join/src/yamlRestTest/resources/rest-api-spec/test/20_parent_join.yml diff --git a/modules/parent-join/src/test/resources/rest-api-spec/test/30_inner_hits.yml b/modules/parent-join/src/yamlRestTest/resources/rest-api-spec/test/30_inner_hits.yml similarity index 100% rename from modules/parent-join/src/test/resources/rest-api-spec/test/30_inner_hits.yml rename to modules/parent-join/src/yamlRestTest/resources/rest-api-spec/test/30_inner_hits.yml diff --git a/modules/percolator/build.gradle b/modules/percolator/build.gradle index 926a6d2f925..bae92b94984 100644 --- a/modules/percolator/build.gradle +++ b/modules/percolator/build.gradle @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -apply plugin: 'elasticsearch.rest-resources' +apply plugin: 'elasticsearch.yaml-rest-test' esplugin { description 'Percolator module adds capability to index queries and query these queries by specifying documents' @@ -46,3 +46,5 @@ restResources { includeCore '_common', 'indices', 'index', 'search', 'msearch' } } + +integTest.enabled = false diff --git a/modules/percolator/src/test/java/org/elasticsearch/percolator/PercolatorClientYamlTestSuiteIT.java b/modules/percolator/src/yamlRestTest/java/org/elasticsearch/percolator/PercolatorClientYamlTestSuiteIT.java similarity index 100% rename from modules/percolator/src/test/java/org/elasticsearch/percolator/PercolatorClientYamlTestSuiteIT.java rename to modules/percolator/src/yamlRestTest/java/org/elasticsearch/percolator/PercolatorClientYamlTestSuiteIT.java diff --git a/modules/percolator/src/test/resources/rest-api-spec/test/10_basic.yml b/modules/percolator/src/yamlRestTest/resources/rest-api-spec/test/10_basic.yml similarity index 100% rename from modules/percolator/src/test/resources/rest-api-spec/test/10_basic.yml rename to modules/percolator/src/yamlRestTest/resources/rest-api-spec/test/10_basic.yml diff --git a/modules/rank-eval/build.gradle b/modules/rank-eval/build.gradle index 3e6d41060c5..b6a67994404 100644 --- a/modules/rank-eval/build.gradle +++ b/modules/rank-eval/build.gradle @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -apply plugin: 'elasticsearch.rest-resources' +apply plugin: 'elasticsearch.yaml-rest-test' esplugin { description 'The Rank Eval module adds APIs to evaluate ranking quality.' @@ -30,7 +30,7 @@ restResources { } } -testClusters.integTest { +testClusters.all { // Modules who's integration is explicitly tested in integration tests module project(':modules:lang-mustache').tasks.bundlePlugin.archiveFile } diff --git a/modules/rank-eval/src/test/java/org/elasticsearch/index/rankeval/RankEvalYamlIT.java b/modules/rank-eval/src/yamlRestTest/java/org/elasticsearch/index/rankeval/RankEvalYamlIT.java similarity index 100% rename from modules/rank-eval/src/test/java/org/elasticsearch/index/rankeval/RankEvalYamlIT.java rename to modules/rank-eval/src/yamlRestTest/java/org/elasticsearch/index/rankeval/RankEvalYamlIT.java diff --git a/modules/rank-eval/src/test/resources/rest-api-spec/test/rank_eval/10_basic.yml b/modules/rank-eval/src/yamlRestTest/resources/rest-api-spec/test/rank_eval/10_basic.yml similarity index 100% rename from modules/rank-eval/src/test/resources/rest-api-spec/test/rank_eval/10_basic.yml rename to modules/rank-eval/src/yamlRestTest/resources/rest-api-spec/test/rank_eval/10_basic.yml diff --git a/modules/rank-eval/src/test/resources/rest-api-spec/test/rank_eval/20_dcg.yml b/modules/rank-eval/src/yamlRestTest/resources/rest-api-spec/test/rank_eval/20_dcg.yml similarity index 100% rename from modules/rank-eval/src/test/resources/rest-api-spec/test/rank_eval/20_dcg.yml rename to modules/rank-eval/src/yamlRestTest/resources/rest-api-spec/test/rank_eval/20_dcg.yml diff --git a/modules/rank-eval/src/test/resources/rest-api-spec/test/rank_eval/30_failures.yml b/modules/rank-eval/src/yamlRestTest/resources/rest-api-spec/test/rank_eval/30_failures.yml similarity index 100% rename from modules/rank-eval/src/test/resources/rest-api-spec/test/rank_eval/30_failures.yml rename to modules/rank-eval/src/yamlRestTest/resources/rest-api-spec/test/rank_eval/30_failures.yml diff --git a/modules/rank-eval/src/test/resources/rest-api-spec/test/rank_eval/40_rank_eval_templated.yml b/modules/rank-eval/src/yamlRestTest/resources/rest-api-spec/test/rank_eval/40_rank_eval_templated.yml similarity index 100% rename from modules/rank-eval/src/test/resources/rest-api-spec/test/rank_eval/40_rank_eval_templated.yml rename to modules/rank-eval/src/yamlRestTest/resources/rest-api-spec/test/rank_eval/40_rank_eval_templated.yml diff --git a/modules/reindex/build.gradle b/modules/reindex/build.gradle index b34bb82cce5..b5eca353a89 100644 --- a/modules/reindex/build.gradle +++ b/modules/reindex/build.gradle @@ -24,7 +24,7 @@ import org.elasticsearch.gradle.info.BuildParams apply plugin: 'elasticsearch.test-with-dependencies' apply plugin: 'elasticsearch.jdk-download' -apply plugin: 'elasticsearch.rest-resources' +apply plugin: 'elasticsearch.yaml-rest-test' esplugin { description 'The Reindex module adds APIs to reindex from one index to another or update documents in place.' @@ -32,7 +32,7 @@ esplugin { hasClientJar = true } -testClusters.integTest { +testClusters.all { // Modules who's integration is explicitly tested in integration tests module project(':modules:parent-join').tasks.bundlePlugin.archiveFile module project(':modules:lang-painless').tasks.bundlePlugin.archiveFile diff --git a/modules/reindex/src/test/java/org/elasticsearch/index/reindex/ReindexClientYamlTestSuiteIT.java b/modules/reindex/src/yamlRestTest/java/org/elasticsearch/index/reindex/ReindexClientYamlTestSuiteIT.java similarity index 100% rename from modules/reindex/src/test/java/org/elasticsearch/index/reindex/ReindexClientYamlTestSuiteIT.java rename to modules/reindex/src/yamlRestTest/java/org/elasticsearch/index/reindex/ReindexClientYamlTestSuiteIT.java diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/delete_by_query/10_basic.yml b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/delete_by_query/10_basic.yml similarity index 100% rename from modules/reindex/src/test/resources/rest-api-spec/test/delete_by_query/10_basic.yml rename to modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/delete_by_query/10_basic.yml diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/delete_by_query/20_validation.yml b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/delete_by_query/20_validation.yml similarity index 100% rename from modules/reindex/src/test/resources/rest-api-spec/test/delete_by_query/20_validation.yml rename to modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/delete_by_query/20_validation.yml diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/delete_by_query/40_versioning.yml b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/delete_by_query/40_versioning.yml similarity index 100% rename from modules/reindex/src/test/resources/rest-api-spec/test/delete_by_query/40_versioning.yml rename to modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/delete_by_query/40_versioning.yml diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/delete_by_query/50_wait_for_active_shards.yml b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/delete_by_query/50_wait_for_active_shards.yml similarity index 100% rename from modules/reindex/src/test/resources/rest-api-spec/test/delete_by_query/50_wait_for_active_shards.yml rename to modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/delete_by_query/50_wait_for_active_shards.yml diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/delete_by_query/70_throttle.yml b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/delete_by_query/70_throttle.yml similarity index 100% rename from modules/reindex/src/test/resources/rest-api-spec/test/delete_by_query/70_throttle.yml rename to modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/delete_by_query/70_throttle.yml diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/delete_by_query/80_slices.yml b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/delete_by_query/80_slices.yml similarity index 100% rename from modules/reindex/src/test/resources/rest-api-spec/test/delete_by_query/80_slices.yml rename to modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/delete_by_query/80_slices.yml diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/reindex/10_basic.yml b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/10_basic.yml similarity index 100% rename from modules/reindex/src/test/resources/rest-api-spec/test/reindex/10_basic.yml rename to modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/10_basic.yml diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/reindex/20_validation.yml b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/20_validation.yml similarity index 100% rename from modules/reindex/src/test/resources/rest-api-spec/test/reindex/20_validation.yml rename to modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/20_validation.yml diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/reindex/25_no_auto_create.yml b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/25_no_auto_create.yml similarity index 100% rename from modules/reindex/src/test/resources/rest-api-spec/test/reindex/25_no_auto_create.yml rename to modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/25_no_auto_create.yml diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/reindex/30_search.yml b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/30_search.yml similarity index 100% rename from modules/reindex/src/test/resources/rest-api-spec/test/reindex/30_search.yml rename to modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/30_search.yml diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/reindex/35_search_failures.yml b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/35_search_failures.yml similarity index 100% rename from modules/reindex/src/test/resources/rest-api-spec/test/reindex/35_search_failures.yml rename to modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/35_search_failures.yml diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/reindex/40_versioning.yml b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/40_versioning.yml similarity index 100% rename from modules/reindex/src/test/resources/rest-api-spec/test/reindex/40_versioning.yml rename to modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/40_versioning.yml diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/reindex/50_routing.yml b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/50_routing.yml similarity index 100% rename from modules/reindex/src/test/resources/rest-api-spec/test/reindex/50_routing.yml rename to modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/50_routing.yml diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/reindex/60_wait_for_active_shards.yml b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/60_wait_for_active_shards.yml similarity index 100% rename from modules/reindex/src/test/resources/rest-api-spec/test/reindex/60_wait_for_active_shards.yml rename to modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/60_wait_for_active_shards.yml diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/reindex/70_throttle.yml b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/70_throttle.yml similarity index 100% rename from modules/reindex/src/test/resources/rest-api-spec/test/reindex/70_throttle.yml rename to modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/70_throttle.yml diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/reindex/80_slices.yml b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/80_slices.yml similarity index 100% rename from modules/reindex/src/test/resources/rest-api-spec/test/reindex/80_slices.yml rename to modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/80_slices.yml diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/reindex/85_scripting.yml b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/85_scripting.yml similarity index 100% rename from modules/reindex/src/test/resources/rest-api-spec/test/reindex/85_scripting.yml rename to modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/85_scripting.yml diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/reindex/90_remote.yml b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/90_remote.yml similarity index 100% rename from modules/reindex/src/test/resources/rest-api-spec/test/reindex/90_remote.yml rename to modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/90_remote.yml diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/reindex/95_parent_join.yml b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/95_parent_join.yml similarity index 100% rename from modules/reindex/src/test/resources/rest-api-spec/test/reindex/95_parent_join.yml rename to modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/95_parent_join.yml diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/10_basic.yml b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/update_by_query/10_basic.yml similarity index 100% rename from modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/10_basic.yml rename to modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/update_by_query/10_basic.yml diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/20_validation.yml b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/update_by_query/20_validation.yml similarity index 100% rename from modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/20_validation.yml rename to modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/update_by_query/20_validation.yml diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/30_new_fields.yml b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/update_by_query/30_new_fields.yml similarity index 100% rename from modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/30_new_fields.yml rename to modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/update_by_query/30_new_fields.yml diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/35_search_failure.yml b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/update_by_query/35_search_failure.yml similarity index 100% rename from modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/35_search_failure.yml rename to modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/update_by_query/35_search_failure.yml diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/40_versioning.yml b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/update_by_query/40_versioning.yml similarity index 100% rename from modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/40_versioning.yml rename to modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/update_by_query/40_versioning.yml diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/50_consistency.yml b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/update_by_query/50_consistency.yml similarity index 100% rename from modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/50_consistency.yml rename to modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/update_by_query/50_consistency.yml diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/60_throttle.yml b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/update_by_query/60_throttle.yml similarity index 100% rename from modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/60_throttle.yml rename to modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/update_by_query/60_throttle.yml diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/70_slices.yml b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/update_by_query/70_slices.yml similarity index 100% rename from modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/70_slices.yml rename to modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/update_by_query/70_slices.yml diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/80_scripting.yml b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/update_by_query/80_scripting.yml similarity index 100% rename from modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/80_scripting.yml rename to modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/update_by_query/80_scripting.yml diff --git a/modules/repository-url/build.gradle b/modules/repository-url/build.gradle index 9eaf68b7641..6f2dff252d9 100644 --- a/modules/repository-url/build.gradle +++ b/modules/repository-url/build.gradle @@ -21,7 +21,9 @@ import org.elasticsearch.gradle.PropertyNormalization import org.elasticsearch.gradle.info.BuildParams import org.elasticsearch.gradle.test.AntFixture -apply plugin: 'elasticsearch.rest-resources' +apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'elasticsearch.internal-cluster-test' + esplugin { description 'Module for URL repository' @@ -34,6 +36,8 @@ restResources { } } +integTest.enabled = false + // This directory is shared between two URL repositories and one FS repository in YAML integration tests File repositoryDir = new File(project.buildDir, "shared-repository") @@ -47,11 +51,14 @@ task urlFixture(type: AntFixture) { executable = "${BuildParams.runtimeJavaHome}/bin/java" args 'org.elasticsearch.repositories.url.URLFixture', baseDir, "${repositoryDir.absolutePath}" } - -integTest { +yamlRestTest { dependsOn urlFixture } -testClusters.integTest { + +internalClusterTest { + dependsOn urlFixture +} +testClusters.all { // repositoryDir is used by a FS repository to create snapshots setting 'path.repo', "${repositoryDir.absolutePath}", PropertyNormalization.IGNORE_VALUE // repositoryDir is used by two URL repositories to restore snapshots @@ -59,3 +66,4 @@ testClusters.integTest { "http://snapshot.test*,http://${urlFixture.addressAndPort}" }, PropertyNormalization.IGNORE_VALUE } + diff --git a/modules/repository-url/src/test/java/org/elasticsearch/repositories/url/URLSnapshotRestoreTests.java b/modules/repository-url/src/internalClusterTest/java/org/elasticsearch/repositories/url/URLSnapshotRestoreIT.java similarity index 98% rename from modules/repository-url/src/test/java/org/elasticsearch/repositories/url/URLSnapshotRestoreTests.java rename to modules/repository-url/src/internalClusterTest/java/org/elasticsearch/repositories/url/URLSnapshotRestoreIT.java index ab9268b0814..a79e5807eae 100644 --- a/modules/repository-url/src/test/java/org/elasticsearch/repositories/url/URLSnapshotRestoreTests.java +++ b/modules/repository-url/src/internalClusterTest/java/org/elasticsearch/repositories/url/URLSnapshotRestoreIT.java @@ -42,7 +42,7 @@ import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.notNullValue; @ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST) -public class URLSnapshotRestoreTests extends ESIntegTestCase { +public class URLSnapshotRestoreIT extends ESIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/modules/repository-url/src/test/java/org/elasticsearch/repositories/url/RepositoryURLClientYamlTestSuiteIT.java b/modules/repository-url/src/yamlRestTest/java/org/elasticsearch/repositories/url/RepositoryURLClientYamlTestSuiteIT.java similarity index 99% rename from modules/repository-url/src/test/java/org/elasticsearch/repositories/url/RepositoryURLClientYamlTestSuiteIT.java rename to modules/repository-url/src/yamlRestTest/java/org/elasticsearch/repositories/url/RepositoryURLClientYamlTestSuiteIT.java index 65d9b87b07d..8080238ee7b 100644 --- a/modules/repository-url/src/test/java/org/elasticsearch/repositories/url/RepositoryURLClientYamlTestSuiteIT.java +++ b/modules/repository-url/src/yamlRestTest/java/org/elasticsearch/repositories/url/RepositoryURLClientYamlTestSuiteIT.java @@ -93,7 +93,7 @@ public class RepositoryURLClientYamlTestSuiteIT extends ESClientYamlSuiteTestCas // Create a URL repository using the file://{path.repo} URL Request createFileRepositoryRequest = new Request("PUT", "/_snapshot/repository-file"); - createFileRepositoryRequest.setEntity(buildRepositorySettings(URLRepository.TYPE, + createFileRepositoryRequest.setEntity(buildRepositorySettings("url", Settings.builder().put("url", pathRepoUri.toString()).build())); Response createFileRepositoryResponse = client().performRequest(createFileRepositoryRequest); assertThat(createFileRepositoryResponse.getStatusLine().getStatusCode(), equalTo(RestStatus.OK.getStatus())); @@ -106,7 +106,7 @@ public class RepositoryURLClientYamlTestSuiteIT extends ESClientYamlSuiteTestCas InetAddress inetAddress = InetAddress.getByName(new URL(allowedUrl).getHost()); if (inetAddress.isAnyLocalAddress() || inetAddress.isLoopbackAddress()) { Request createUrlRepositoryRequest = new Request("PUT", "/_snapshot/repository-url"); - createUrlRepositoryRequest.setEntity(buildRepositorySettings(URLRepository.TYPE, + createUrlRepositoryRequest.setEntity(buildRepositorySettings("url", Settings.builder().put("url", allowedUrl).build())); Response createUrlRepositoryResponse = client().performRequest(createUrlRepositoryRequest); assertThat(createUrlRepositoryResponse.getStatusLine().getStatusCode(), equalTo(RestStatus.OK.getStatus())); diff --git a/modules/repository-url/src/test/resources/rest-api-spec/test/repository_url/10_basic.yml b/modules/repository-url/src/yamlRestTest/resources/rest-api-spec/test/repository_url/10_basic.yml similarity index 100% rename from modules/repository-url/src/test/resources/rest-api-spec/test/repository_url/10_basic.yml rename to modules/repository-url/src/yamlRestTest/resources/rest-api-spec/test/repository_url/10_basic.yml diff --git a/modules/repository-url/src/test/resources/rest-api-spec/test/repository_url/20_repository.yml b/modules/repository-url/src/yamlRestTest/resources/rest-api-spec/test/repository_url/20_repository.yml similarity index 100% rename from modules/repository-url/src/test/resources/rest-api-spec/test/repository_url/20_repository.yml rename to modules/repository-url/src/yamlRestTest/resources/rest-api-spec/test/repository_url/20_repository.yml diff --git a/modules/transport-netty4/build.gradle b/modules/transport-netty4/build.gradle index 2095bf1e8cc..7ee95e38fdb 100644 --- a/modules/transport-netty4/build.gradle +++ b/modules/transport-netty4/build.gradle @@ -21,7 +21,7 @@ import org.elasticsearch.gradle.info.BuildParams import org.elasticsearch.gradle.test.RestIntegTestTask -apply plugin: 'elasticsearch.rest-resources' +apply plugin: 'elasticsearch.yaml-rest-test' /* TODOs: diff --git a/modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4ClientYamlTestSuiteIT.java b/modules/transport-netty4/src/yamlRestTest/java/org/elasticsearch/http/netty4/Netty4ClientYamlTestSuiteIT.java similarity index 100% rename from modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4ClientYamlTestSuiteIT.java rename to modules/transport-netty4/src/yamlRestTest/java/org/elasticsearch/http/netty4/Netty4ClientYamlTestSuiteIT.java diff --git a/modules/transport-netty4/src/test/resources/rest-api-spec/test/10_basic.yml b/modules/transport-netty4/src/yamlRestTest/resources/rest-api-spec/test/10_basic.yml similarity index 100% rename from modules/transport-netty4/src/test/resources/rest-api-spec/test/10_basic.yml rename to modules/transport-netty4/src/yamlRestTest/resources/rest-api-spec/test/10_basic.yml