build.gradle 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. apply plugin: 'elasticsearch.internal-yaml-rest-test'
  2. import org.elasticsearch.gradle.util.GradleUtils
  3. dependencies {
  4. testImplementation project(':x-pack:qa')
  5. testImplementation project(':x-pack:qa:multi-project:yaml-test-framework')
  6. clusterModules project(':modules:mapper-extras')
  7. clusterModules project(':modules:rank-eval')
  8. clusterModules project(':modules:ingest-common')
  9. clusterModules project(':modules:reindex')
  10. clusterModules project(':modules:analysis-common')
  11. clusterModules project(':modules:health-shards-availability')
  12. clusterModules project(':modules:data-streams')
  13. clusterModules project(':modules:lang-mustache')
  14. clusterModules project(':modules:parent-join')
  15. clusterModules project(xpackModule('stack'))
  16. clusterModules project(xpackModule('ilm'))
  17. clusterModules project(xpackModule('mapper-constant-keyword'))
  18. clusterModules project(xpackModule('wildcard'))
  19. clusterModules project(':test:external-modules:test-multi-project')
  20. restTestConfig project(path: ':modules:data-streams', configuration: "basicRestSpecs")
  21. restTestConfig project(path: ':modules:ingest-common', configuration: "basicRestSpecs")
  22. restTestConfig project(path: ':modules:reindex', configuration: "basicRestSpecs")
  23. }
  24. // let the yamlRestTests see the classpath of test
  25. GradleUtils.extendSourceSet(project, "test", "yamlRestTest", tasks.named("yamlRestTest"))
  26. restResources {
  27. restTests {
  28. includeCore '*'
  29. }
  30. }
  31. tasks.named("yamlRestTest").configure {
  32. ArrayList<String> blacklist = [
  33. /* These tests don't work on multi-project yet - we need to go through each of them and make them work */
  34. '^cat.recovery/*/*',
  35. '^cat.snapshots/*/*',
  36. '^cluster.desired_balance/10_basic/*',
  37. '^data_stream/40_supported_apis/Verify shard stores api', // uses _shard_stores API
  38. '^health/10_basic/*',
  39. '^indices.get_alias/10_basic/Get alias against closed indices', // Does NOT work with security enabled, see also core-rest-tests-with-security
  40. '^indices.recovery/*/*',
  41. '^indices.resolve_cluster/*/*',
  42. '^indices.resolve_cluster/*/*/*',
  43. '^indices.shard_stores/*/*',
  44. '^migration/*/*',
  45. '^snapshot.clone/*/*',
  46. '^snapshot.create/*/*',
  47. '^snapshot.delete/*/*',
  48. '^snapshot.get/*/*',
  49. '^snapshot.get_repository/20_repository_uuid/*',
  50. '^snapshot.restore/*/*',
  51. '^snapshot.status/*/*',
  52. '^synonyms/*/*',
  53. '^tsdb/30_snapshot/*',
  54. '^update_by_query/80_scripting/Update all docs with one deletion and one noop using a stored script', // scripting is not project aware yet
  55. // The following tests are muted because the functionality that they are testing is not available in a multi-project setup
  56. // The node removal prevalidation is only available for a Stateful deployment.
  57. '^cluster.prevalidate_node_removal/*/*',
  58. // This behaviour doesn't work with security: https://github.com/elastic/elasticsearch/issues/120252
  59. '^reindex/30_search/Sorting deprecated wait_for_completion false',
  60. // These tests assume we are running on a single node
  61. '^delete_by_query/50_wait_for_active_shards/can override wait_for_active_shards',
  62. '^update_by_query/50_consistency/can override wait_for_active_shards',
  63. // Reindex from remote is not supported on Serverless and required additional testing setup
  64. '^reindex/60_wait_for_active_shards/can override wait_for_active_shards', // <- Requires a single shard
  65. '^reindex/90_remote/*',
  66. '^reindex/95_parent_join/Reindex from remote*',
  67. ];
  68. if (buildParams.snapshotBuild == false) {
  69. blacklist += [];
  70. }
  71. systemProperty 'tests.rest.blacklist', blacklist.join(',')
  72. systemProperty "tests.multi_project.enabled", true
  73. }