build.gradle 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. /*
  2. * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
  3. * or more contributor license agreements. Licensed under the Elastic License
  4. * 2.0 and the Server Side Public License, v 1; you may not use this file except
  5. * in compliance with, at your election, the Elastic License 2.0 or the Server
  6. * Side Public License, v 1.
  7. */
  8. import org.elasticsearch.gradle.Version
  9. apply plugin: 'elasticsearch.java'
  10. dependencies {
  11. api project(":test:yaml-rest-runner")
  12. }
  13. // We don't currently have any tests for this because they are test utilities.
  14. tasks.named("test").configure { enabled = false }
  15. subprojects {
  16. if (project.name.startsWith('core-with-')) {
  17. apply plugin: 'elasticsearch.internal-yaml-rest-test'
  18. dependencies {
  19. yamlRestTestImplementation project(":x-pack:qa:runtime-fields")
  20. }
  21. restResources {
  22. restApi {
  23. include '_common', 'bulk', 'count', 'cluster', 'index', 'indices', 'field_caps', 'msearch',
  24. 'search', 'async_search', 'graph', '*_point_in_time'
  25. }
  26. restTests {
  27. includeCore '*'
  28. includeXpack 'async_search', 'graph'
  29. }
  30. }
  31. testClusters.matching { it.name == "yamlRestTest" }.configureEach {
  32. testDistribution = 'DEFAULT'
  33. setting 'xpack.license.self_generated.type', 'trial'
  34. setting 'xpack.security.enabled', 'false'
  35. requiresFeature 'es.index_mode_feature_flag_registered', Version.fromString("8.0.0")
  36. }
  37. tasks.named("yamlRestTest").configure {
  38. def suites = [
  39. 'async_search',
  40. 'search',
  41. 'search.aggregation',
  42. 'search.highlight',
  43. 'search.inner_hits',
  44. 'search_shards',
  45. 'suggest',
  46. ]
  47. if (project.name.equals('core-with-mapped')) {
  48. suites += [
  49. // These two don't support runtime fields on the request. Should they?
  50. 'field_caps',
  51. 'graph',
  52. // The search request tests don't know how to support msearch for now
  53. 'msearch',
  54. ]
  55. }
  56. systemProperty 'tests.rest.suite', suites.join(',')
  57. systemProperty 'tests.rest.blacklist',
  58. [
  59. /////// TO FIX ///////
  60. 'search.aggregation/40_range/Date range', //source only date field should also emit values for numbers, it expects strings only
  61. 'search/115_multiple_field_collapsing/two levels fields collapsing', // Field collapsing on a runtime field does not work
  62. 'field_caps/30_index_filter/Field caps with index filter', // We don't support filtering field caps on runtime fields. What should we do?
  63. 'search.aggregation/220_filters_bucket/cache busting', // runtime keyword does not support split_queries_on_whitespace
  64. 'search/140_pre_filter_search_shards/pre_filter_shard_size with shards that have no hit',
  65. //completion suggester does not return options when the context field is a geo_point runtime field
  66. 'suggest/30_context/Multi contexts should work',
  67. //there is something wrong when using dotted document syntax here, passes in main yaml tests
  68. 'search/330_fetch_fields/Test nested field inside object structure',
  69. /////// TO FIX ///////
  70. /////// NOT SUPPORTED ///////
  71. 'search.highlight/40_keyword_ignore/Plain Highligher should skip highlighting ignored keyword values', // The plain highlighter is incompatible with the prefix queries that we make for runtime fields, use unified highlighter instead.
  72. 'search.aggregation/280_rare_terms/*', // Requires an index and we won't have it
  73. 'search.aggregation/22_terms_disable_opt/*', // Optimization requires an index and runtime fields don't have one
  74. // Runtime fields don't support sub-fields
  75. 'search.aggregation/10_histogram/*',
  76. 'suggest/50_completion_with_multi_fields/Search by suggestion on geofield-hash on sub field should work',
  77. // Runtime fields don't have global ords
  78. 'analytics/nested_top_metrics_sort/*',
  79. 'search.aggregation/20_terms/string profiler via global ordinals filters implementation',
  80. 'search.aggregation/20_terms/string profiler via global ordinals native implementation',
  81. 'search.aggregation/20_terms/Global ordinals are loaded with the global_ordinals execution hint',
  82. 'search.aggregation/170_cardinality_metric/profiler string',
  83. 'search.aggregation/170_cardinality_metric/profiler string segment ords hint',
  84. 'search.aggregation/170_cardinality_metric/profiler string global ords hint',
  85. 'search.aggregation/170_cardinality_metric/profiler string direct hint',
  86. 'search.aggregation/170_cardinality_metric/profiler string save memory hint',
  87. 'search.aggregation/170_cardinality_metric/profiler string save time hint',
  88. 'search.aggregation/235_composite_sorted/*',
  89. // timeseries dimensions can't be runtime fields
  90. 'search.aggregation/450_time_series/*',
  91. // The error messages are different
  92. 'search/330_fetch_fields/error includes field name',
  93. 'search/330_fetch_fields/error includes glob pattern',
  94. // we need a @timestamp field to be defined in index mapping
  95. 'search/380_sort_segments_on_timestamp/*',
  96. 'field_caps/40_time_series/*',
  97. // Synthetic source needs doc values that runtime fields tests disable
  98. 'search/400_synthetic_source/*',
  99. 'search.highlight/50_synthetic_source/*',
  100. /////// NOT SUPPORTED ///////
  101. ].join(',')
  102. }
  103. }
  104. }