2024-10-23 17:15:41 +08:00
|
|
|
apply plugin: 'elasticsearch.internal-yaml-rest-test'
|
|
|
|
import org.elasticsearch.gradle.internal.info.BuildParams
|
2024-10-29 09:40:46 +08:00
|
|
|
import org.elasticsearch.gradle.util.GradleUtils
|
2024-10-23 17:15:41 +08:00
|
|
|
|
|
|
|
dependencies {
|
|
|
|
testImplementation project(':x-pack:qa')
|
2024-10-29 09:40:46 +08:00
|
|
|
testImplementation project(':x-pack:qa:multi-project:yaml-test-framework')
|
2024-10-23 17:15:41 +08:00
|
|
|
clusterModules project(':modules:mapper-extras')
|
|
|
|
clusterModules project(':modules:rank-eval')
|
|
|
|
clusterModules project(':modules:ingest-common')
|
|
|
|
clusterModules project(':modules:reindex')
|
|
|
|
clusterModules project(':modules:analysis-common')
|
|
|
|
clusterModules project(':modules:health-shards-availability')
|
|
|
|
clusterModules project(':modules:data-streams')
|
|
|
|
clusterModules project(':modules:multi-project')
|
|
|
|
clusterModules project(xpackModule('stack'))
|
|
|
|
clusterModules project(xpackModule('ilm'))
|
|
|
|
clusterModules project(xpackModule('mapper-constant-keyword'))
|
|
|
|
clusterModules project(xpackModule('wildcard'))
|
|
|
|
}
|
|
|
|
|
2024-10-29 09:40:46 +08:00
|
|
|
// let the yamlRestTests see the classpath of test
|
|
|
|
GradleUtils.extendSourceSet(project, "test", "yamlRestTest", tasks.named("yamlRestTest"))
|
|
|
|
|
2024-10-23 17:15:41 +08:00
|
|
|
restResources {
|
|
|
|
restTests {
|
|
|
|
includeCore '*'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.named("yamlRestTest").configure {
|
|
|
|
ArrayList<String> blacklist = [
|
|
|
|
/* These tests don't work on multi-project yet - we need to go through each of them and make them work */
|
|
|
|
'bulk/*/*',
|
|
|
|
'cat.aliases/*/*',
|
|
|
|
'cat.allocation/10_basic/*',
|
|
|
|
'cat.fielddata/10_basic/*',
|
|
|
|
'cat.indices/*/*',
|
|
|
|
'cat.recovery/*/*',
|
|
|
|
'cat.segments/*/*',
|
|
|
|
'cat.shards/*/*',
|
|
|
|
'cat.snapshots/*/*',
|
|
|
|
'cat.templates/*/*',
|
|
|
|
'cluster.desired_balance/10_basic/*',
|
|
|
|
'cluster.desired_nodes/*/*',
|
|
|
|
'cluster.prevalidate_node_removal/*/*',
|
|
|
|
'cluster.reroute/11_explain/*',
|
|
|
|
'cluster.state/20_filtering/*',
|
|
|
|
'cluster.state/30_expand_wildcards/*',
|
|
|
|
'cluster.stats/*/*',
|
|
|
|
'count/*/*',
|
|
|
|
'create/*/*',
|
|
|
|
'delete/*/*',
|
|
|
|
'exists/*/*',
|
|
|
|
'explain/*/*',
|
|
|
|
'field_caps/*/*',
|
2024-11-12 06:40:53 +08:00
|
|
|
'get/100_synthetic_source/_doc_count', // requires refresh to work
|
2024-10-23 17:15:41 +08:00
|
|
|
'get_source/*/*',
|
|
|
|
'health/*/*',
|
|
|
|
'index/*/*',
|
|
|
|
'indices.analyze/*/*',
|
|
|
|
'indices.blocks/*/*',
|
|
|
|
'indices.clear_cache/*/*',
|
|
|
|
'indices.clone/*/*',
|
|
|
|
'indices.create/*/*',
|
|
|
|
'indices.create/*/*/*',
|
|
|
|
'indices.delete/*/*',
|
|
|
|
'indices.delete_alias/*/*',
|
|
|
|
'indices.exists_alias/*/*',
|
|
|
|
'indices.exists_template/*/*',
|
|
|
|
'indices.forcemerge/*/*',
|
2024-11-12 06:40:53 +08:00
|
|
|
'indices.get/*/*',
|
2024-10-23 17:15:41 +08:00
|
|
|
'indices.get_alias/*/*',
|
|
|
|
'indices.get_alias/10_basic/Get aliases via /*/_alias/',
|
|
|
|
'indices.get_alias/10_basic/Get aliases via /*/_alias/{name}',
|
|
|
|
'indices.get_alias/10_basic/Get aliases via /*suf/_alias/{name}',
|
|
|
|
'indices.get_alias/10_basic/Get aliases via /_alias/*',
|
|
|
|
'indices.get_alias/10_basic/Get aliases via /_alias/_all',
|
|
|
|
'indices.get_alias/10_basic/Get aliases via /_alias/{name}',
|
|
|
|
'indices.get_alias/10_basic/Get aliases via /_all/_alias/',
|
|
|
|
'indices.get_alias/10_basic/Get aliases via /_all/_alias/{name}',
|
|
|
|
'indices.get_alias/10_basic/Get aliases via /name,name/_alias/{name}',
|
|
|
|
'indices.get_alias/10_basic/Get aliases via /{index}/_alias/*',
|
|
|
|
'indices.get_alias/10_basic/Get aliases via /{index}/_alias/_all',
|
|
|
|
'indices.get_alias/10_basic/Get aliases via /{index}/_alias/name,name',
|
|
|
|
'indices.get_alias/10_basic/Get aliases via /{index}/_alias/prefix*',
|
|
|
|
'indices.get_alias/10_basic/Get all aliases via /_alias',
|
|
|
|
'indices.get_alias/10_basic/Get all aliases via /{index}/_alias/',
|
|
|
|
'indices.get_alias/10_basic/Get and index with no aliases via /{index}/_alias/',
|
|
|
|
'indices.get_alias/10_basic/Get specific alias via /{index}/_alias/{name}',
|
|
|
|
'indices.get_alias/20_empty/Check empty aliases when getting all aliases via /_alias',
|
|
|
|
'indices.get_field_mapping/*/*',
|
|
|
|
'indices.get_index_template/*/*',
|
2024-11-12 14:46:50 +08:00
|
|
|
'indices.get_mapping/40_aliases/Getting mapping for aliases should return the real index as key', // aliases do not work
|
|
|
|
'indices.get_mapping/50_wildcard_expansion/*', // index close does not work
|
2024-11-12 15:59:39 +08:00
|
|
|
'indices.get_settings/20_aliases/Getting settings for aliases should return the real index as key', // aliases do not work
|
2024-10-23 17:15:41 +08:00
|
|
|
'indices.get_template/*/*',
|
|
|
|
'indices.open/*/*',
|
|
|
|
'indices.open/*/*/*',
|
|
|
|
'indices.put_alias/*/*',
|
2024-11-07 23:55:47 +08:00
|
|
|
// This test is blocked on the ability to add ingest pipelines in multiple projects.
|
|
|
|
'indices.put_index_template/15_composition/Using deprecated component templates and pipelines in index template',
|
2024-10-23 17:15:41 +08:00
|
|
|
'indices.put_mapping/*/*',
|
|
|
|
'indices.put_settings/*/*',
|
|
|
|
'indices.put_template/*/*',
|
|
|
|
'indices.recovery/*/*',
|
|
|
|
'indices.resolve_cluster/*/*',
|
|
|
|
'indices.rollover/*/*',
|
|
|
|
'indices.segments/*/*',
|
|
|
|
'indices.shard_stores/*/*',
|
|
|
|
'indices.shrink/*/*',
|
|
|
|
'indices.simulate_index_template/*/*',
|
|
|
|
'indices.simulate_template/*/*',
|
|
|
|
'indices.sort/*/*',
|
|
|
|
'indices.split/*/*',
|
|
|
|
'indices.stats/*/*',
|
|
|
|
'indices.update_aliases/*/*',
|
|
|
|
'indices.validate_query/*/*',
|
|
|
|
'ingest/*/*',
|
|
|
|
'logsdb/*/*',
|
|
|
|
'mget/*/*',
|
|
|
|
'mget/*/*/*',
|
|
|
|
'migration/*/*',
|
|
|
|
'mlt/*/*',
|
|
|
|
'msearch/*/*',
|
|
|
|
'mtermvectors/*/*',
|
|
|
|
'nodes.info/*/*',
|
|
|
|
'nodes.reload_secure_settings/*/*',
|
|
|
|
'nodes.stats/*/*',
|
|
|
|
'range/*/*',
|
|
|
|
'scripts/*/*',
|
|
|
|
'scroll/*/*',
|
2024-11-18 12:42:13 +08:00
|
|
|
'search/10_source_filtering/*',
|
|
|
|
'search/20_default_values/*',
|
|
|
|
'search/30_limits/*',
|
|
|
|
'search/40_indices_boost/*',
|
|
|
|
'search/40_indices_boost/*/*',
|
|
|
|
'search/60_query_string/*',
|
|
|
|
'search/70_response_filtering/*',
|
|
|
|
'search/80_indices_options/Closed index',
|
|
|
|
'search/90_search_after/Format sort values',
|
|
|
|
'search/90_search_after/search with search_after parameter',
|
|
|
|
'search/100_stored_fields/Stored fields',
|
|
|
|
'search/110_field_collapsing/*',
|
|
|
|
'search/120_batch_reduce_size/batched_reduce_size 2 with 5 shards',
|
|
|
|
'search/140_pre_filter_search_shards/*',
|
|
|
|
'search/150_rewrite_on_coordinator/*',
|
|
|
|
'search/160_exists_query*/*',
|
|
|
|
'search/161_exists_query_within_nested_query/*',
|
|
|
|
'search/190_index_prefix_search/*',
|
|
|
|
'search/200_ignore_malformed/*',
|
|
|
|
'search/200_index_phrase_search/*',
|
|
|
|
'search/220_total_hits_object/*',
|
|
|
|
'search/240_date_nanos/*',
|
|
|
|
'search/300_sequence_numbers/*',
|
|
|
|
'search/310_match_bool_prefix/*',
|
|
|
|
'search/330_fetch_fields/Test basic field retrieval',
|
|
|
|
'search/330_fetch_fields/Test date formatting',
|
|
|
|
'search/330_fetch_fields/Test disable source',
|
|
|
|
'search/330_fetch_fields/Test ignore malformed',
|
|
|
|
'search/330_fetch_fields/Test search rewrite',
|
|
|
|
'search/330_fetch_fields/error includes field name',
|
|
|
|
'search/350_point_in_time/*',
|
|
|
|
'search/380_sort_segments_on_timestamp/Test that index segments are NOT sorted on timestamp field when @timestamp field is dynamically added',
|
|
|
|
'search/390_doc_values_search/*',
|
|
|
|
'search/390_lookup_fields/*',
|
|
|
|
'search/400_synthetic_source/_doc_count',
|
|
|
|
'search/410_named_queries/*',
|
|
|
|
'search/520_fetch_fields/fetch fields with none stored_fields',
|
|
|
|
'search/issue4895/Test with _local preference placed in query body - should fail',
|
2024-10-23 17:15:41 +08:00
|
|
|
'search.highlight/*/*',
|
|
|
|
'search.inner_hits/*/*',
|
|
|
|
'search.retrievers/*/*',
|
|
|
|
'search.vectors/*/*',
|
|
|
|
'simulate.ingest/*/*',
|
|
|
|
'snapshot.clone/*/*',
|
|
|
|
'snapshot.create/*/*',
|
|
|
|
'snapshot.delete/*/*',
|
|
|
|
'snapshot.get/*/*',
|
|
|
|
'snapshot.get_repository/*/*',
|
|
|
|
'snapshot.restore/*/*',
|
|
|
|
'snapshot.status/*/*',
|
|
|
|
'suggest/*/*',
|
|
|
|
'synonyms/*/*',
|
|
|
|
'tasks.cancel/*/*',
|
|
|
|
'tasks.get/*/*',
|
|
|
|
'tasks.list/*/*',
|
|
|
|
'termvectors/*/*',
|
|
|
|
'tsdb/*/*',
|
|
|
|
'update/*/*'
|
|
|
|
];
|
|
|
|
if (BuildParams.isSnapshotBuild() == false) {
|
|
|
|
blacklist += [];
|
|
|
|
}
|
|
|
|
systemProperty 'tests.rest.blacklist', blacklist.join(',')
|
|
|
|
}
|