elasticsearch/x-pack/qa/multi-project/core-rest-tests-with-multiple-projects/build.gradle
2024-12-04 17:36:20 +01:00

130 lines
5.3 KiB
Groovy

apply plugin: 'elasticsearch.internal-yaml-rest-test'
import org.elasticsearch.gradle.util.GradleUtils
dependencies {
testImplementation project(':x-pack:qa')
testImplementation project(':x-pack:qa:multi-project:yaml-test-framework')
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'))
restTestConfig project(path: ':modules:data-streams', configuration: "basicRestSpecs")
}
// let the yamlRestTests see the classpath of test
GradleUtils.extendSourceSet(project, "test", "yamlRestTest", tasks.named("yamlRestTest"))
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 */
'^cat.aliases/10_basic/*',
'^cat.indices/*/*',
'^cat.recovery/*/*',
'^cat.segments/*/*',
'^cat.snapshots/*/*',
'^cluster.allocation_explain/10_basic/Cluster shard allocation explanation test with a closed index', // closed index
'^cluster.desired_balance/10_basic/*',
'^cluster.health/10_basic/cluster health with closed index', // closed index
'^cluster.health/30_indices_options/cluster health with expand_wildcards', // closed index
'^cluster.state/20_filtering/*',
'^cluster.state/30_expand_wildcards/*',
'^cluster.stats/*/*',
// A lot of these data stream tests depend on rollover
'^data_stream/lifecycle/*/*',
'^data_stream/10_basic/Create data stream with failure store',
'^data_stream/10_basic/Delete data stream with failure store',
'^data_stream/10_basic/Get data stream and check DSL and ILM information',
'^data_stream/20_unsupported_apis/*',
'^data_stream/40_supported_apis/*',
'^data_stream/50_delete_backing_indices/*',
'^data_stream/70_rollover_data_streams/*',
'^data_stream/80_resolve_index_data_streams/*',
'^data_stream/90_reindex/*',
'^data_stream/100_delete_by_query/*',
'^data_stream/110_update_by_query/*',
'^data_stream/120_data_streams_stats/*',
'^data_stream/130_migrate_to_data_stream/*',
'^data_stream/140_data_stream_aliases/*',
'^data_stream/150_tsdb/*',
'^data_stream/170_modify_data_stream/*',
'^data_stream/180_simulate_existing_data_stream/*',
'^data_stream/190_failure_store_redirection/*',
'^data_stream/200_rollover_failure_store/*',
'^health/10_basic/*',
'^health/40_diagnosis/*',
'^indices.blocks/*/*',
'^indices.clear_cache/*/*',
'^indices.clone/*/*',
'^indices.exists/20_read_only_index/*',
'^indices.get/*/*',
'^indices.get_alias/10_basic/Get alias against closed indices',
'^indices.get_mapping/50_wildcard_expansion/*', // index close does not work
'^indices.open/*/*',
'^indices.open/*/*/*',
'^indices.put_settings/*/*',
'^indices.recovery/*/*',
'^indices.resolve_cluster/*/*',
'^indices.resolve_cluster/*/*/*',
'^indices.resolve_index/*/*',
'^indices.rollover/*/*',
'^indices.segments/*/*',
'^indices.shard_stores/*/*',
'^indices.shrink/*/*',
'^indices.simulate_index_template/*/*',
'^indices.simulate_template/*/*',
'^indices.sort/10_basic/*',
'^indices.split/*/*',
'^indices.stats/15_open_closed_state/*',
'^indices.stats/20_translog/*',
'^indices.stats/30_segments/*',
'^indices.stats/60_field_usage/*',
'^migration/*/*',
'^scroll/12_slices/*',
'^search/80_indices_options/Closed index',
'^search/380_sort_segments_on_timestamp/Test that index segments are NOT sorted on timestamp field when @timestamp field is dynamically added',
'^search.highlight/10_unified/*',
'^search.vectors/41_knn_search_bbq_hnsw/*',
'^search.vectors/41_knn_search_byte_quantized/*',
'^search.vectors/41_knn_search_half_byte_quantized/*',
'^search.vectors/42_knn_search_bbq_flat/*',
'^search.vectors/50_dense_vector_field_usage/*',
'^search.vectors/60_dense_vector_dynamic_mapping/*',
'^search.vectors/70_dense_vector_telemetry/*',
'^search.vectors/180_update_dense_vector_type/*',
'^simulate.ingest/*/*',
'^snapshot.clone/*/*',
'^snapshot.create/*/*',
'^snapshot.delete/*/*',
'^snapshot.get/*/*',
'^snapshot.get_repository/20_repository_uuid/*',
'^snapshot.restore/*/*',
'^snapshot.status/*/*',
'^synonyms/*/*',
'^tsdb/10_settings/*',
'^tsdb/30_snapshot/*',
'^tsdb/80_index_resize/*',
// The following tests are muted because the functionality that they are testing is not available in a multi-project setup
// The node removal prevalidation is only available for a Stateful deployment.
'^cluster.prevalidate_node_removal/*/*'
];
if (buildParams.isSnapshotBuild() == false) {
blacklist += [];
}
systemProperty 'tests.rest.blacklist', blacklist.join(',')
}