build.gradle 4.4 KB

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