couchbase 3.4.1 → 3.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (278) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/ext/couchbase/CMakeLists.txt +59 -7
  4. data/ext/couchbase/cmake/Documentation.cmake +0 -1
  5. data/ext/couchbase/cmake/OpenSSL.cmake +98 -3
  6. data/ext/couchbase/cmake/Testing.cmake +12 -4
  7. data/ext/couchbase/cmake/ThirdPartyDependencies.cmake +4 -0
  8. data/ext/couchbase/cmake/build_config.hxx.in +3 -0
  9. data/ext/couchbase/core/bucket.cxx +3 -2
  10. data/ext/couchbase/core/bucket.hxx +9 -0
  11. data/ext/couchbase/core/cluster.hxx +17 -0
  12. data/ext/couchbase/core/cluster_options.cxx +2 -2
  13. data/ext/couchbase/core/cluster_options.hxx +4 -7
  14. data/ext/couchbase/core/{config_profile.cxx → cluster_options_fwd.hxx} +7 -6
  15. data/ext/couchbase/core/config_profile.hxx +2 -65
  16. data/ext/couchbase/core/config_profiles.cxx +79 -0
  17. data/ext/couchbase/core/config_profiles.hxx +56 -0
  18. data/ext/couchbase/core/error_context/search.hxx +1 -1
  19. data/ext/couchbase/core/impl/analytics.cxx +237 -0
  20. data/ext/couchbase/core/impl/boolean_field_query.cxx +40 -0
  21. data/ext/couchbase/core/impl/boolean_query.cxx +62 -0
  22. data/ext/couchbase/core/impl/cluster.cxx +2 -1
  23. data/ext/couchbase/core/impl/conjunction_query.cxx +51 -0
  24. data/ext/couchbase/core/impl/date_range.cxx +89 -0
  25. data/ext/couchbase/core/impl/date_range_facet.cxx +54 -0
  26. data/ext/couchbase/core/impl/date_range_facet_result.cxx +64 -0
  27. data/ext/couchbase/core/impl/date_range_query.cxx +125 -0
  28. data/ext/couchbase/core/impl/disjunction_query.cxx +51 -0
  29. data/ext/couchbase/core/impl/dns_srv_tracker.cxx +5 -3
  30. data/ext/couchbase/core/impl/encoded_search_facet.hxx +29 -0
  31. data/ext/couchbase/core/impl/encoded_search_query.hxx +29 -0
  32. data/ext/couchbase/core/impl/encoded_search_sort.hxx +29 -0
  33. data/ext/couchbase/core/impl/geo_bounding_box_query.cxx +46 -0
  34. data/ext/couchbase/core/impl/geo_distance_query.cxx +43 -0
  35. data/ext/couchbase/core/impl/geo_polygon_query.cxx +46 -0
  36. data/ext/couchbase/core/impl/internal_date_range_facet_result.cxx +80 -0
  37. data/ext/couchbase/core/impl/internal_date_range_facet_result.hxx +48 -0
  38. data/ext/couchbase/core/impl/internal_numeric_range_facet_result.cxx +80 -0
  39. data/ext/couchbase/core/impl/internal_numeric_range_facet_result.hxx +48 -0
  40. data/ext/couchbase/core/impl/internal_search_error_context.cxx +141 -0
  41. data/ext/couchbase/core/impl/internal_search_error_context.hxx +61 -0
  42. data/ext/couchbase/core/impl/internal_search_meta_data.cxx +60 -0
  43. data/ext/couchbase/core/impl/internal_search_meta_data.hxx +41 -0
  44. data/ext/couchbase/core/impl/internal_search_result.cxx +84 -0
  45. data/ext/couchbase/core/impl/internal_search_result.hxx +43 -0
  46. data/ext/couchbase/core/impl/internal_search_row.cxx +82 -0
  47. data/ext/couchbase/core/impl/internal_search_row.hxx +56 -0
  48. data/ext/couchbase/core/impl/internal_search_row_location.hxx +32 -0
  49. data/ext/couchbase/core/impl/internal_search_row_locations.cxx +137 -0
  50. data/ext/couchbase/core/impl/internal_search_row_locations.hxx +45 -0
  51. data/ext/couchbase/core/impl/internal_term_facet_result.cxx +80 -0
  52. data/ext/couchbase/core/impl/internal_term_facet_result.hxx +48 -0
  53. data/ext/couchbase/core/impl/match_all_query.cxx +35 -0
  54. data/ext/couchbase/core/impl/match_none_query.cxx +35 -0
  55. data/ext/couchbase/core/impl/match_phrase_query.cxx +43 -0
  56. data/ext/couchbase/core/impl/match_query.cxx +59 -0
  57. data/ext/couchbase/core/impl/numeric_range.cxx +49 -0
  58. data/ext/couchbase/core/impl/numeric_range_facet.cxx +54 -0
  59. data/ext/couchbase/core/impl/numeric_range_facet_result.cxx +64 -0
  60. data/ext/couchbase/core/impl/numeric_range_query.cxx +56 -0
  61. data/ext/couchbase/core/impl/phrase_query.cxx +42 -0
  62. data/ext/couchbase/core/impl/prefix_query.cxx +40 -0
  63. data/ext/couchbase/core/impl/query.cxx +5 -5
  64. data/ext/couchbase/core/impl/query_string_query.cxx +37 -0
  65. data/ext/couchbase/core/impl/regexp_query.cxx +40 -0
  66. data/ext/couchbase/core/impl/search.cxx +191 -0
  67. data/ext/couchbase/core/impl/search_error_context.cxx +147 -0
  68. data/ext/couchbase/core/impl/search_meta_data.cxx +46 -0
  69. data/ext/couchbase/core/impl/search_result.cxx +66 -0
  70. data/ext/couchbase/core/impl/search_row.cxx +74 -0
  71. data/ext/couchbase/core/impl/search_row_location.cxx +64 -0
  72. data/ext/couchbase/core/impl/search_row_locations.cxx +66 -0
  73. data/ext/couchbase/core/impl/search_sort_field.cxx +104 -0
  74. data/ext/couchbase/core/impl/search_sort_id.cxx +43 -0
  75. data/ext/couchbase/core/impl/search_sort_score.cxx +43 -0
  76. data/ext/couchbase/core/impl/term_facet.cxx +36 -0
  77. data/ext/couchbase/core/impl/term_facet_result.cxx +64 -0
  78. data/ext/couchbase/core/impl/term_query.cxx +56 -0
  79. data/ext/couchbase/core/impl/term_range_query.cxx +57 -0
  80. data/ext/couchbase/core/impl/wildcard_query.cxx +40 -0
  81. data/ext/couchbase/core/io/dns_client.cxx +225 -0
  82. data/ext/couchbase/core/io/dns_client.hxx +19 -188
  83. data/ext/couchbase/core/io/http_context.hxx +1 -1
  84. data/ext/couchbase/core/io/http_session.hxx +10 -0
  85. data/ext/couchbase/core/io/http_session_manager.hxx +5 -3
  86. data/ext/couchbase/core/io/mcbp_session.cxx +28 -1
  87. data/ext/couchbase/core/io/retry_orchestrator.hxx +3 -2
  88. data/ext/couchbase/core/json_string.hxx +5 -0
  89. data/ext/couchbase/core/meta/version.cxx +18 -4
  90. data/ext/couchbase/core/mozilla_ca_bundle.hxx +39 -0
  91. data/ext/couchbase/core/operations/document_analytics.cxx +1 -0
  92. data/ext/couchbase/core/operations/document_analytics.hxx +1 -0
  93. data/ext/couchbase/core/operations/document_append.hxx +1 -1
  94. data/ext/couchbase/core/operations/document_decrement.hxx +1 -1
  95. data/ext/couchbase/core/operations/document_exists.hxx +1 -1
  96. data/ext/couchbase/core/operations/document_get.hxx +1 -1
  97. data/ext/couchbase/core/operations/document_get_and_lock.hxx +1 -1
  98. data/ext/couchbase/core/operations/document_get_and_touch.hxx +1 -1
  99. data/ext/couchbase/core/operations/document_get_projected.hxx +1 -1
  100. data/ext/couchbase/core/operations/document_increment.hxx +1 -1
  101. data/ext/couchbase/core/operations/document_insert.hxx +1 -1
  102. data/ext/couchbase/core/operations/document_lookup_in.hxx +1 -1
  103. data/ext/couchbase/core/operations/document_mutate_in.hxx +1 -1
  104. data/ext/couchbase/core/operations/document_prepend.hxx +1 -1
  105. data/ext/couchbase/core/operations/document_query.cxx +2 -0
  106. data/ext/couchbase/core/operations/document_query.hxx +6 -0
  107. data/ext/couchbase/core/operations/document_remove.hxx +1 -1
  108. data/ext/couchbase/core/operations/document_replace.hxx +1 -1
  109. data/ext/couchbase/core/operations/document_search.cxx +4 -1
  110. data/ext/couchbase/core/operations/document_search.hxx +2 -1
  111. data/ext/couchbase/core/operations/document_touch.hxx +1 -1
  112. data/ext/couchbase/core/operations/document_unlock.hxx +1 -1
  113. data/ext/couchbase/core/operations/document_upsert.hxx +1 -1
  114. data/ext/couchbase/core/operations/document_view.hxx +1 -0
  115. data/ext/couchbase/core/protocol/client_request.hxx +11 -2
  116. data/ext/couchbase/core/public_fwd.hxx +21 -0
  117. data/ext/couchbase/core/tls_verify_mode.hxx +26 -0
  118. data/ext/couchbase/core/topology/configuration.cxx +15 -2
  119. data/ext/couchbase/core/topology/configuration.hxx +5 -1
  120. data/ext/couchbase/core/transactions/active_transaction_record.hxx +2 -2
  121. data/ext/couchbase/core/transactions/attempt_context_impl.cxx +3 -0
  122. data/ext/couchbase/core/transactions/attempt_context_impl.hxx +1 -1
  123. data/ext/couchbase/core/transactions/attempt_context_testing_hooks.cxx +93 -0
  124. data/ext/couchbase/core/transactions/attempt_context_testing_hooks.hxx +48 -75
  125. data/ext/couchbase/core/transactions/cleanup_testing_hooks.cxx +52 -0
  126. data/ext/couchbase/core/transactions/cleanup_testing_hooks.hxx +17 -31
  127. data/ext/couchbase/core/transactions/exceptions.hxx +12 -9
  128. data/ext/couchbase/core/transactions/internal/transaction_context.hxx +12 -12
  129. data/ext/couchbase/core/transactions/internal/transactions_cleanup.hxx +7 -1
  130. data/ext/couchbase/core/transactions/transaction_context.cxx +1 -0
  131. data/ext/couchbase/core/transactions/transactions_cleanup.cxx +144 -155
  132. data/ext/couchbase/core/utils/connection_string.cxx +27 -3
  133. data/ext/couchbase/core/utils/connection_string.hxx +3 -3
  134. data/ext/couchbase/core/utils/json.cxx +4 -1
  135. data/ext/couchbase/couchbase/analytics_error_context.hxx +143 -0
  136. data/ext/couchbase/couchbase/analytics_meta_data.hxx +155 -0
  137. data/ext/couchbase/couchbase/analytics_metrics.hxx +163 -0
  138. data/ext/couchbase/couchbase/analytics_options.hxx +359 -0
  139. data/ext/couchbase/couchbase/analytics_result.hxx +102 -0
  140. data/ext/couchbase/couchbase/analytics_scan_consistency.hxx +46 -0
  141. data/ext/couchbase/couchbase/analytics_status.hxx +41 -0
  142. data/ext/couchbase/couchbase/analytics_warning.hxx +85 -0
  143. data/ext/couchbase/couchbase/behavior_options.hxx +10 -1
  144. data/ext/couchbase/couchbase/boolean_field_query.hxx +77 -0
  145. data/ext/couchbase/couchbase/boolean_query.hxx +223 -0
  146. data/ext/couchbase/couchbase/cluster.hxx +75 -1
  147. data/ext/couchbase/couchbase/conjunction_query.hxx +88 -0
  148. data/ext/couchbase/couchbase/date_range.hxx +69 -0
  149. data/ext/couchbase/couchbase/date_range_facet.hxx +56 -0
  150. data/ext/couchbase/couchbase/date_range_facet_result.hxx +55 -0
  151. data/ext/couchbase/couchbase/date_range_query.hxx +265 -0
  152. data/ext/couchbase/couchbase/disjunction_query.hxx +109 -0
  153. data/ext/couchbase/couchbase/doc_id_query.hxx +111 -0
  154. data/ext/couchbase/couchbase/error_context.hxx +7 -6
  155. data/ext/couchbase/couchbase/fmt/analytics_scan_consistency.hxx +52 -0
  156. data/ext/couchbase/couchbase/fmt/analytics_status.hxx +76 -0
  157. data/ext/couchbase/couchbase/fmt/search_scan_consistency.hxx +49 -0
  158. data/ext/couchbase/couchbase/geo_bounding_box_query.hxx +107 -0
  159. data/ext/couchbase/couchbase/geo_distance_query.hxx +109 -0
  160. data/ext/couchbase/couchbase/geo_point.hxx +32 -0
  161. data/ext/couchbase/couchbase/geo_polygon_query.hxx +85 -0
  162. data/ext/couchbase/couchbase/highlight_style.hxx +45 -0
  163. data/ext/couchbase/couchbase/match_all_query.hxx +43 -0
  164. data/ext/couchbase/couchbase/match_none_query.hxx +43 -0
  165. data/ext/couchbase/couchbase/match_operator.hxx +45 -0
  166. data/ext/couchbase/couchbase/match_phrase_query.hxx +108 -0
  167. data/ext/couchbase/couchbase/match_query.hxx +163 -0
  168. data/ext/couchbase/couchbase/numeric_range.hxx +58 -0
  169. data/ext/couchbase/couchbase/numeric_range_facet.hxx +56 -0
  170. data/ext/couchbase/couchbase/numeric_range_facet_result.hxx +55 -0
  171. data/ext/couchbase/couchbase/numeric_range_query.hxx +143 -0
  172. data/ext/couchbase/couchbase/phrase_query.hxx +93 -0
  173. data/ext/couchbase/couchbase/prefix_query.hxx +82 -0
  174. data/ext/couchbase/couchbase/query_options.hxx +0 -1
  175. data/ext/couchbase/couchbase/query_string_query.hxx +72 -0
  176. data/ext/couchbase/couchbase/regexp_query.hxx +82 -0
  177. data/ext/couchbase/couchbase/scope.hxx +73 -0
  178. data/ext/couchbase/couchbase/search_date_range.hxx +68 -0
  179. data/ext/couchbase/couchbase/search_error_context.hxx +138 -0
  180. data/ext/couchbase/couchbase/search_facet.hxx +60 -0
  181. data/ext/couchbase/couchbase/search_facet_result.hxx +50 -0
  182. data/ext/couchbase/couchbase/search_meta_data.hxx +85 -0
  183. data/ext/couchbase/couchbase/search_metrics.hxx +127 -0
  184. data/ext/couchbase/couchbase/search_numeric_range.hxx +69 -0
  185. data/ext/couchbase/couchbase/search_options.hxx +509 -0
  186. data/ext/couchbase/couchbase/search_query.hxx +69 -0
  187. data/ext/couchbase/couchbase/search_result.hxx +77 -0
  188. data/ext/couchbase/couchbase/search_row.hxx +104 -0
  189. data/ext/couchbase/couchbase/search_row_location.hxx +55 -0
  190. data/ext/couchbase/couchbase/search_row_locations.hxx +86 -0
  191. data/ext/couchbase/couchbase/search_scan_consistency.hxx +34 -0
  192. data/ext/couchbase/couchbase/search_sort.hxx +58 -0
  193. data/ext/couchbase/couchbase/search_sort_field.hxx +117 -0
  194. data/ext/couchbase/couchbase/search_sort_field_missing.hxx +26 -0
  195. data/ext/couchbase/couchbase/search_sort_field_mode.hxx +27 -0
  196. data/ext/couchbase/couchbase/search_sort_field_type.hxx +28 -0
  197. data/ext/couchbase/couchbase/search_sort_id.hxx +60 -0
  198. data/ext/couchbase/couchbase/search_sort_score.hxx +60 -0
  199. data/ext/couchbase/couchbase/search_term_range.hxx +51 -0
  200. data/ext/couchbase/couchbase/security_options.hxx +3 -0
  201. data/ext/couchbase/couchbase/term_facet.hxx +48 -0
  202. data/ext/couchbase/couchbase/term_facet_result.hxx +55 -0
  203. data/ext/couchbase/couchbase/term_query.hxx +151 -0
  204. data/ext/couchbase/couchbase/term_range_query.hxx +142 -0
  205. data/ext/couchbase/couchbase/tracing/request_span.hxx +63 -0
  206. data/ext/couchbase/couchbase/tracing/request_tracer.hxx +2 -40
  207. data/ext/couchbase/couchbase/transactions/async_attempt_context.hxx +83 -4
  208. data/ext/couchbase/couchbase/transactions/attempt_context.hxx +68 -1
  209. data/ext/couchbase/couchbase/transactions/transaction_get_result.hxx +2 -0
  210. data/ext/couchbase/couchbase/transactions/transaction_keyspace.hxx +11 -1
  211. data/ext/couchbase/couchbase/transactions/transaction_options.hxx +79 -8
  212. data/ext/couchbase/couchbase/transactions/transaction_query_options.hxx +128 -15
  213. data/ext/couchbase/couchbase/transactions/transaction_query_result.hxx +4 -0
  214. data/ext/couchbase/couchbase/transactions/transaction_result.hxx +1 -1
  215. data/ext/couchbase/couchbase/transactions/transactions_cleanup_config.hxx +5 -3
  216. data/ext/couchbase/couchbase/transactions/transactions_config.hxx +9 -5
  217. data/ext/couchbase/couchbase/transactions/transactions_query_config.hxx +6 -3
  218. data/ext/couchbase/couchbase/transactions.hxx +34 -1
  219. data/ext/couchbase/couchbase/wildcard_query.hxx +83 -0
  220. data/ext/couchbase/test/CMakeLists.txt +8 -7
  221. data/ext/couchbase/test/benchmark_helper_integration.hxx +2 -2
  222. data/ext/couchbase/test/test_helper.hxx +6 -6
  223. data/ext/couchbase/test/test_integration_analytics.cxx +314 -16
  224. data/ext/couchbase/test/test_integration_collections.cxx +7 -3
  225. data/ext/couchbase/test/test_integration_connect.cxx +7 -3
  226. data/ext/couchbase/test/test_integration_crud.cxx +19 -2
  227. data/ext/couchbase/test/test_integration_diagnostics.cxx +11 -5
  228. data/ext/couchbase/test/test_integration_durability.cxx +12 -7
  229. data/ext/couchbase/test/test_integration_examples.cxx +324 -11
  230. data/ext/couchbase/test/test_integration_management.cxx +162 -94
  231. data/ext/couchbase/test/test_integration_query.cxx +68 -10
  232. data/ext/couchbase/test/test_integration_range_scan.cxx +12 -12
  233. data/ext/couchbase/test/test_integration_read_replica.cxx +48 -11
  234. data/ext/couchbase/test/test_integration_search.cxx +621 -0
  235. data/ext/couchbase/test/test_integration_subdoc.cxx +62 -11
  236. data/ext/couchbase/test/test_integration_tracer.cxx +5 -0
  237. data/ext/couchbase/test/test_integration_transcoders.cxx +13 -5
  238. data/ext/couchbase/test/{test_transaction_transaction_context.cxx → test_transaction_context.cxx} +1 -1
  239. data/ext/couchbase/test/test_transaction_examples.cxx +195 -0
  240. data/ext/couchbase/test/{test_transaction_transaction_simple.cxx → test_transaction_simple.cxx} +90 -5
  241. data/ext/couchbase/test/{test_transaction_transaction_simple_async.cxx → test_transaction_simple_async.cxx} +19 -21
  242. data/ext/couchbase/test/test_unit_config_profiles.cxx +13 -13
  243. data/ext/couchbase/test/test_unit_connection_string.cxx +35 -0
  244. data/ext/couchbase/test/test_unit_json_transcoder.cxx +4 -0
  245. data/ext/couchbase/test/test_unit_search.cxx +427 -0
  246. data/ext/couchbase/test/test_unit_transaction_utils.cxx +10 -1
  247. data/ext/couchbase/test/test_unit_utils.cxx +8 -4
  248. data/ext/couchbase/third_party/snappy/CMakeLists.txt +150 -27
  249. data/ext/couchbase/third_party/snappy/cmake/config.h.in +28 -24
  250. data/ext/couchbase/third_party/snappy/snappy-internal.h +189 -25
  251. data/ext/couchbase/third_party/snappy/snappy-sinksource.cc +26 -9
  252. data/ext/couchbase/third_party/snappy/snappy-sinksource.h +11 -11
  253. data/ext/couchbase/third_party/snappy/snappy-stubs-internal.cc +1 -1
  254. data/ext/couchbase/third_party/snappy/snappy-stubs-internal.h +227 -308
  255. data/ext/couchbase/third_party/snappy/snappy-stubs-public.h.in +0 -11
  256. data/ext/couchbase/third_party/snappy/snappy.cc +1176 -410
  257. data/ext/couchbase/third_party/snappy/snappy.h +19 -4
  258. data/ext/couchbase.cxx +85 -22
  259. data/ext/revisions.rb +3 -3
  260. data/lib/couchbase/authenticator.rb +0 -1
  261. data/lib/couchbase/cluster.rb +13 -13
  262. data/lib/couchbase/cluster_registry.rb +7 -2
  263. data/lib/couchbase/config_profiles.rb +1 -1
  264. data/lib/couchbase/configuration.rb +3 -4
  265. data/lib/couchbase/json_transcoder.rb +12 -5
  266. data/lib/couchbase/management/collection_query_index_manager.rb +54 -15
  267. data/lib/couchbase/management/query_index_manager.rb +70 -5
  268. data/lib/couchbase/options.rb +85 -2
  269. data/lib/couchbase/raw_binary_transcoder.rb +37 -0
  270. data/lib/couchbase/raw_json_transcoder.rb +38 -0
  271. data/lib/couchbase/raw_string_transcoder.rb +40 -0
  272. data/lib/couchbase/search_options.rb +163 -240
  273. data/lib/couchbase/transcoder_flags.rb +62 -0
  274. data/lib/couchbase/version.rb +1 -1
  275. metadata +151 -12
  276. data/ext/couchbase/core/CMakeLists.txt +0 -0
  277. /data/ext/couchbase/test/{test_transaction_transaction_public_async_api.cxx → test_transaction_public_async_api.cxx} +0 -0
  278. /data/ext/couchbase/test/{test_transaction_transaction_public_blocking_api.cxx → test_transaction_public_blocking_api.cxx} +0 -0
@@ -17,6 +17,8 @@
17
17
 
18
18
  #include "test_helper_integration.hxx"
19
19
 
20
+ #include <catch2/catch_approx.hpp>
21
+
20
22
  #include "core/management/analytics_link.hxx"
21
23
  #include "core/operations/management/analytics.hxx"
22
24
  #include "core/operations/management/bucket.hxx"
@@ -32,6 +34,8 @@
32
34
  #include "couchbase/drop_query_index_options.hxx"
33
35
  #include "couchbase/watch_query_indexes_options.hxx"
34
36
 
37
+ using Catch::Approx;
38
+
35
39
  static couchbase::core::operations::management::bucket_get_response
36
40
  wait_for_bucket_created(test::utils::integration_test_guard& integration, const std::string& bucket_name)
37
41
  {
@@ -59,7 +63,7 @@ TEST_CASE("integration: bucket management", "[integration]")
59
63
  test::utils::integration_test_guard integration;
60
64
 
61
65
  if (!integration.cluster_version().supports_bucket_management()) {
62
- return;
66
+ SKIP("cluster does not support bucket management");
63
67
  }
64
68
 
65
69
  if (!integration.cluster_version().supports_gcccp()) {
@@ -108,7 +112,7 @@ TEST_CASE("integration: bucket management", "[integration]")
108
112
  {
109
113
  couchbase::core::operations::management::bucket_get_all_request req{};
110
114
  auto resp = test::utils::execute(integration.cluster, req);
111
- INFO(resp.ctx.http_body)
115
+ INFO(resp.ctx.http_body);
112
116
  REQUIRE_SUCCESS(resp.ctx.ec);
113
117
  bool found = false;
114
118
  for (const auto& bucket : resp.buckets) {
@@ -508,7 +512,7 @@ TEST_CASE("integration: collection management", "[integration]")
508
512
  test::utils::open_bucket(integration.cluster, integration.ctx.bucket);
509
513
 
510
514
  if (!integration.cluster_version().supports_collections()) {
511
- return;
515
+ SKIP("cluster does not support collections");
512
516
  }
513
517
 
514
518
  auto scope_name = test::utils::uniq_id("scope");
@@ -648,7 +652,7 @@ TEST_CASE("integration: user groups management", "[integration]")
648
652
  test::utils::integration_test_guard integration;
649
653
 
650
654
  if (!integration.cluster_version().supports_user_groups()) {
651
- return;
655
+ SKIP("cluster does not support user groups");
652
656
  }
653
657
 
654
658
  SECTION("group crud")
@@ -859,7 +863,7 @@ TEST_CASE("integration: user management", "[integration]")
859
863
  test::utils::integration_test_guard integration;
860
864
 
861
865
  if (!integration.cluster_version().supports_user_management()) {
862
- return;
866
+ SKIP("cluster does not support user management");
863
867
  }
864
868
 
865
869
  if (!integration.cluster_version().supports_gcccp()) {
@@ -957,9 +961,14 @@ TEST_CASE("integration: user management collections roles", "[integration]")
957
961
  test::utils::integration_test_guard integration;
958
962
  test::utils::open_bucket(integration.cluster, integration.ctx.bucket);
959
963
 
960
- if (!integration.cluster_version().supports_user_management() || !integration.cluster_version().supports_collections() ||
961
- integration.cluster_version().is_community()) {
962
- return;
964
+ if (!integration.cluster_version().supports_user_management()) {
965
+ SKIP("cluster does not support user management");
966
+ }
967
+ if (!integration.cluster_version().supports_collections()) {
968
+ SKIP("cluster does not support collections");
969
+ }
970
+ if (integration.cluster_version().is_community()) {
971
+ SKIP("cluster is community edition");
963
972
  }
964
973
 
965
974
  auto scope_name = test::utils::uniq_id("scope");
@@ -1033,6 +1042,10 @@ TEST_CASE("integration: query index management", "[integration]")
1033
1042
  {
1034
1043
  test::utils::integration_test_guard integration;
1035
1044
 
1045
+ if (!integration.cluster_version().supports_query_index_management()) {
1046
+ SKIP("cluster does not support query index management");
1047
+ }
1048
+
1036
1049
  if (integration.cluster_version().supports_bucket_management()) {
1037
1050
  SECTION("primary index")
1038
1051
  {
@@ -1440,8 +1453,11 @@ TEST_CASE("integration: collections query index management", "[integration]")
1440
1453
  {
1441
1454
  test::utils::integration_test_guard integration;
1442
1455
 
1456
+ if (!integration.cluster_version().supports_query_index_management()) {
1457
+ SKIP("cluster does not support query index management");
1458
+ }
1443
1459
  if (!integration.cluster_version().supports_collections()) {
1444
- return;
1460
+ SKIP("cluster does not support collections");
1445
1461
  }
1446
1462
 
1447
1463
  auto index_name = test::utils::uniq_id("collections_index");
@@ -1956,13 +1972,14 @@ TEST_CASE("integration: analytics index management", "[integration]")
1956
1972
  {
1957
1973
  test::utils::integration_test_guard integration;
1958
1974
 
1959
- if (!integration.cluster_version().supports_analytics() || !integration.has_analytics_service()) {
1960
- return;
1975
+ if (!integration.cluster_version().supports_analytics()) {
1976
+ SKIP("cluster does not support analytics service");
1977
+ }
1978
+ if (!integration.has_analytics_service()) {
1979
+ SKIP("cluster does not have analytics service");
1961
1980
  }
1962
-
1963
- // MB-47718
1964
1981
  if (integration.storage_backend() == couchbase::core::management::cluster::bucket_storage_backend::magma) {
1965
- return;
1982
+ SKIP("analytics does not work with magma storage backend, see MB-47718");
1966
1983
  }
1967
1984
 
1968
1985
  SECTION("crud")
@@ -2488,18 +2505,20 @@ TEST_CASE("integration: analytics external link management", "[integration]")
2488
2505
  {
2489
2506
  test::utils::integration_test_guard integration;
2490
2507
 
2491
- if (!integration.cluster_version().supports_analytics_links() || !integration.has_analytics_service()) {
2492
- return;
2508
+ if (!integration.cluster_version().supports_analytics()) {
2509
+ SKIP("cluster does not support analytics service");
2510
+ }
2511
+ if (!integration.has_analytics_service()) {
2512
+ SKIP("cluster does not have analytics service");
2513
+ }
2514
+ if (!integration.cluster_version().supports_analytics_links()) {
2515
+ SKIP("analytics does not support analytics links");
2493
2516
  }
2494
-
2495
- // MB-47718
2496
2517
  if (integration.storage_backend() == couchbase::core::management::cluster::bucket_storage_backend::magma) {
2497
- return;
2518
+ SKIP("analytics does not work with magma storage backend, see MB-47718");
2498
2519
  }
2499
-
2500
- // MB-40198
2501
2520
  if (!integration.cluster_version().supports_analytics_links_cert_auth() && integration.origin.credentials().uses_certificate()) {
2502
- return;
2521
+ SKIP("certificate credentials selected, but analytics service does not support cert auth, see MB-40198");
2503
2522
  }
2504
2523
 
2505
2524
  test::utils::open_bucket(integration.cluster, integration.ctx.bucket);
@@ -2589,6 +2608,10 @@ TEST_CASE("integration: search index management", "[integration]")
2589
2608
  {
2590
2609
  test::utils::integration_test_guard integration;
2591
2610
 
2611
+ if (!integration.cluster_version().supports_search()) {
2612
+ SKIP("cluster does not support search");
2613
+ }
2614
+
2592
2615
  if (!integration.cluster_version().supports_gcccp()) {
2593
2616
  test::utils::open_bucket(integration.cluster, integration.ctx.bucket);
2594
2617
  }
@@ -2851,11 +2874,23 @@ wait_for_search_pindexes_ready(test::utils::integration_test_guard& integration,
2851
2874
  return false;
2852
2875
  }
2853
2876
  auto stats = couchbase::core::utils::json::parse(resp.stats);
2854
- const auto* num_pindexes_actual = stats.find(fmt::format("{}:{}:num_pindexes_actual", integration.ctx.bucket, index_name));
2877
+
2878
+ const auto num_pindexes_actual_key = fmt::format("{}:{}:num_pindexes_actual", integration.ctx.bucket, index_name);
2879
+ const auto num_pindexes_target_key = fmt::format("{}:{}:num_pindexes_target", integration.ctx.bucket, index_name);
2880
+ const auto* num_pindexes_actual = stats.find(num_pindexes_actual_key);
2881
+ const auto* num_pindexes_target = stats.find(num_pindexes_target_key);
2882
+ CB_LOG_DEBUG(
2883
+ "wait_for_search_pindexes_ready: {}={}, {}={}",
2884
+ num_pindexes_actual_key,
2885
+ (num_pindexes_actual == nullptr || !num_pindexes_actual->is_number()) ? "missing"
2886
+ : std::to_string(num_pindexes_actual->get_unsigned()),
2887
+ num_pindexes_target_key,
2888
+ (num_pindexes_target == nullptr || !num_pindexes_target->is_number()) ? "missing"
2889
+ : std::to_string(num_pindexes_target->get_unsigned()));
2890
+
2855
2891
  if (num_pindexes_actual == nullptr || !num_pindexes_actual->is_number()) {
2856
2892
  return false;
2857
2893
  }
2858
- const auto* num_pindexes_target = stats.find(fmt::format("{}:{}:num_pindexes_target", integration.ctx.bucket, index_name));
2859
2894
  if (num_pindexes_target == nullptr || !num_pindexes_target->is_number()) {
2860
2895
  return false;
2861
2896
  }
@@ -2868,8 +2903,12 @@ TEST_CASE("integration: search index management analyze document", "[integration
2868
2903
  {
2869
2904
  test::utils::integration_test_guard integration;
2870
2905
 
2906
+ if (!integration.cluster_version().supports_search()) {
2907
+ SKIP("cluster does not support search");
2908
+ }
2909
+
2871
2910
  if (!integration.cluster_version().supports_search_analyze()) {
2872
- return;
2911
+ SKIP("cluster does not support search analyze");
2873
2912
  }
2874
2913
 
2875
2914
  auto index_name = test::utils::uniq_id("index");
@@ -2889,7 +2928,7 @@ TEST_CASE("integration: search index management analyze document", "[integration
2889
2928
  REQUIRE_SUCCESS(resp.ctx.ec);
2890
2929
  }
2891
2930
 
2892
- REQUIRE(wait_for_search_pindexes_ready(integration, index_name));
2931
+ REQUIRE(test::utils::wait_for_search_pindexes_ready(integration.cluster, integration.ctx.bucket, index_name));
2893
2932
 
2894
2933
  couchbase::core::operations::management::search_index_analyze_document_response resp;
2895
2934
  bool operation_completed = test::utils::wait_until([&integration, &index_name, &resp]() {
@@ -2920,25 +2959,34 @@ TEST_CASE("integration: freeform HTTP request", "[integration]")
2920
2959
  REQUIRE(resp.ctx.ec == couchbase::errc::common::invalid_argument);
2921
2960
  }
2922
2961
 
2923
- if (integration.cluster_version().supports_analytics() && integration.has_analytics_service()) {
2924
- SECTION("analytics")
2925
- {
2926
- couchbase::core::operations::management::freeform_request req{};
2927
- req.type = couchbase::core::service_type::analytics;
2928
- req.method = "GET";
2929
- req.path = "/admin/ping";
2930
- auto resp = test::utils::execute(integration.cluster, req);
2931
- REQUIRE_SUCCESS(resp.ctx.ec);
2932
- REQUIRE(resp.status == 200);
2933
- REQUIRE_FALSE(resp.body.empty());
2934
- INFO(resp.body)
2935
- auto result = couchbase::core::utils::json::parse(resp.body);
2936
- REQUIRE(result.is_object());
2962
+ SECTION("analytics")
2963
+ {
2964
+ if (!integration.cluster_version().supports_analytics()) {
2965
+ SKIP("cluster does not support analytics");
2966
+ }
2967
+ if (!integration.has_analytics_service()) {
2968
+ SKIP("cluster does not have analytics service");
2937
2969
  }
2970
+
2971
+ couchbase::core::operations::management::freeform_request req{};
2972
+ req.type = couchbase::core::service_type::analytics;
2973
+ req.method = "GET";
2974
+ req.path = "/admin/ping";
2975
+ auto resp = test::utils::execute(integration.cluster, req);
2976
+ REQUIRE_SUCCESS(resp.ctx.ec);
2977
+ REQUIRE(resp.status == 200);
2978
+ REQUIRE_FALSE(resp.body.empty());
2979
+ INFO(resp.body);
2980
+ auto result = couchbase::core::utils::json::parse(resp.body);
2981
+ REQUIRE(result.is_object());
2938
2982
  }
2939
2983
 
2940
2984
  SECTION("search")
2941
2985
  {
2986
+ if (!integration.cluster_version().supports_search()) {
2987
+ SKIP("cluster does not support search");
2988
+ }
2989
+
2942
2990
  couchbase::core::operations::management::freeform_request req{};
2943
2991
  req.type = couchbase::core::service_type::search;
2944
2992
  req.method = "GET";
@@ -2953,6 +3001,10 @@ TEST_CASE("integration: freeform HTTP request", "[integration]")
2953
3001
 
2954
3002
  SECTION("query")
2955
3003
  {
3004
+ if (!integration.cluster_version().supports_query()) {
3005
+ SKIP("cluster does not support query");
3006
+ }
3007
+
2956
3008
  couchbase::core::operations::management::freeform_request req{};
2957
3009
  req.type = couchbase::core::service_type::query;
2958
3010
  req.method = "GET";
@@ -2961,30 +3013,32 @@ TEST_CASE("integration: freeform HTTP request", "[integration]")
2961
3013
  REQUIRE_SUCCESS(resp.ctx.ec);
2962
3014
  REQUIRE(resp.status == 200);
2963
3015
  REQUIRE_FALSE(resp.body.empty());
2964
- INFO(resp.body)
3016
+ INFO(resp.body);
2965
3017
  auto result = couchbase::core::utils::json::parse(resp.body);
2966
3018
  REQUIRE(result.is_object());
2967
3019
  }
2968
3020
 
2969
- if (integration.cluster_version().supports_views()) {
2970
- SECTION("view")
2971
- {
2972
- auto document_name = test::utils::uniq_id("design_document");
2973
- auto view_name = test::utils::uniq_id("view");
2974
-
2975
- couchbase::core::operations::management::freeform_request req{};
2976
- req.type = couchbase::core::service_type::view;
2977
- req.method = "POST";
2978
- req.path = fmt::format("/{}/_design/{}/_view/{}", integration.ctx.bucket, document_name, view_name);
2979
- req.body = R"({"keys":["foo","bar"]})";
2980
- auto resp = test::utils::execute(integration.cluster, req);
2981
- REQUIRE_SUCCESS(resp.ctx.ec);
2982
- REQUIRE(resp.status == 404);
2983
- REQUIRE_FALSE(resp.body.empty());
2984
- auto result = couchbase::core::utils::json::parse(resp.body);
2985
- INFO(resp.body)
2986
- REQUIRE(result["error"].get_string() == "not_found");
3021
+ SECTION("view")
3022
+ {
3023
+ if (!integration.cluster_version().supports_views()) {
3024
+ SKIP("cluster does not support views");
2987
3025
  }
3026
+
3027
+ auto document_name = test::utils::uniq_id("design_document");
3028
+ auto view_name = test::utils::uniq_id("view");
3029
+
3030
+ couchbase::core::operations::management::freeform_request req{};
3031
+ req.type = couchbase::core::service_type::view;
3032
+ req.method = "POST";
3033
+ req.path = fmt::format("/{}/_design/{}/_view/{}", integration.ctx.bucket, document_name, view_name);
3034
+ req.body = R"({"keys":["foo","bar"]})";
3035
+ auto resp = test::utils::execute(integration.cluster, req);
3036
+ REQUIRE_SUCCESS(resp.ctx.ec);
3037
+ REQUIRE(resp.status == 404);
3038
+ REQUIRE_FALSE(resp.body.empty());
3039
+ auto result = couchbase::core::utils::json::parse(resp.body);
3040
+ INFO(resp.body);
3041
+ REQUIRE(result["error"].get_string() == "not_found");
2988
3042
  }
2989
3043
 
2990
3044
  SECTION("management")
@@ -2998,48 +3052,59 @@ TEST_CASE("integration: freeform HTTP request", "[integration]")
2998
3052
  REQUIRE(resp.status == 200);
2999
3053
  REQUIRE_FALSE(resp.body.empty());
3000
3054
  auto result = couchbase::core::utils::json::parse(resp.body);
3001
- INFO(resp.body)
3055
+ INFO(resp.body);
3002
3056
  REQUIRE(result.find("uuid") != nullptr);
3003
3057
  }
3004
3058
 
3005
- if (integration.cluster_version().supports_collections()) {
3006
- SECTION("create scope")
3007
- {
3008
- auto scope_name = test::utils::uniq_id("freeform_scope");
3059
+ SECTION("create scope")
3060
+ {
3061
+ if (!integration.cluster_version().supports_collections()) {
3062
+ SKIP("cluster does not support collections");
3063
+ }
3009
3064
 
3010
- couchbase::core::operations::management::freeform_request req{};
3011
- req.type = couchbase::core::service_type::management;
3012
- req.method = "POST";
3013
- req.path = fmt::format("/pools/default/buckets/{}/scopes", integration.ctx.bucket);
3014
- req.headers["content-type"] = "application/x-www-form-urlencoded";
3015
- req.body = fmt::format("name={}", couchbase::core::utils::string_codec::form_encode(scope_name));
3016
- auto resp = test::utils::execute(integration.cluster, req);
3017
- REQUIRE_SUCCESS(resp.ctx.ec);
3018
- REQUIRE(resp.status == 200);
3019
- REQUIRE_FALSE(resp.headers.empty());
3065
+ auto scope_name = test::utils::uniq_id("freeform_scope");
3066
+
3067
+ couchbase::core::operations::management::freeform_request req{};
3068
+ req.type = couchbase::core::service_type::management;
3069
+ req.method = "POST";
3070
+ req.path = fmt::format("/pools/default/buckets/{}/scopes", integration.ctx.bucket);
3071
+ req.headers["content-type"] = "application/x-www-form-urlencoded";
3072
+ req.body = fmt::format("name={}", couchbase::core::utils::string_codec::form_encode(scope_name));
3073
+ auto resp = test::utils::execute(integration.cluster, req);
3074
+ REQUIRE_SUCCESS(resp.ctx.ec);
3075
+ REQUIRE(resp.status == 200);
3076
+ REQUIRE_FALSE(resp.headers.empty());
3077
+ if (integration.cluster_version().is_mock()) {
3078
+ REQUIRE(resp.headers["content-type"].find("application/json") == std::string::npos);
3079
+ REQUIRE(resp.headers["content-type"].find("text/plain") != std::string::npos);
3080
+ } else {
3020
3081
  REQUIRE(resp.headers["content-type"].find("application/json") != std::string::npos);
3021
- auto result = couchbase::core::utils::json::parse(resp.body);
3022
- REQUIRE(result.is_object());
3023
- REQUIRE(result.find("uid") != nullptr);
3024
3082
  }
3083
+ auto result = couchbase::core::utils::json::parse(resp.body);
3084
+ REQUIRE(result.is_object());
3085
+ REQUIRE(result.find("uid") != nullptr);
3025
3086
  }
3026
3087
 
3027
- if (integration.cluster_version().supports_eventing_functions() && integration.has_eventing_service()) {
3028
- SECTION("eventing")
3029
- {
3030
-
3031
- couchbase::core::operations::management::freeform_request req{};
3032
- req.type = couchbase::core::service_type::eventing;
3033
- req.method = "GET";
3034
- req.path = "/api/v1/functions";
3035
- auto resp = test::utils::execute(integration.cluster, req);
3036
- REQUIRE_SUCCESS(resp.ctx.ec);
3037
- REQUIRE(resp.status == 200);
3038
- REQUIRE_FALSE(resp.body.empty());
3039
- auto result = couchbase::core::utils::json::parse(resp.body);
3040
- INFO(resp.body)
3041
- REQUIRE(result.is_array());
3088
+ SECTION("eventing")
3089
+ {
3090
+ if (!integration.cluster_version().supports_eventing_functions()) {
3091
+ SKIP("cluster does not support eventing functions");
3042
3092
  }
3093
+ if (!integration.has_eventing_service()) {
3094
+ SKIP("cluster does not have eventing service");
3095
+ }
3096
+
3097
+ couchbase::core::operations::management::freeform_request req{};
3098
+ req.type = couchbase::core::service_type::eventing;
3099
+ req.method = "GET";
3100
+ req.path = "/api/v1/functions";
3101
+ auto resp = test::utils::execute(integration.cluster, req);
3102
+ REQUIRE_SUCCESS(resp.ctx.ec);
3103
+ REQUIRE(resp.status == 200);
3104
+ REQUIRE_FALSE(resp.body.empty());
3105
+ auto result = couchbase::core::utils::json::parse(resp.body);
3106
+ INFO(resp.body);
3107
+ REQUIRE(result.is_array());
3043
3108
  }
3044
3109
  }
3045
3110
 
@@ -3082,8 +3147,11 @@ TEST_CASE("integration: eventing functions management", "[integration]")
3082
3147
  {
3083
3148
  test::utils::integration_test_guard integration;
3084
3149
 
3085
- if (!integration.cluster_version().supports_eventing_functions() || !integration.has_eventing_service()) {
3086
- return;
3150
+ if (!integration.cluster_version().supports_eventing_functions()) {
3151
+ SKIP("cluster does not support eventing service");
3152
+ }
3153
+ if (!integration.has_eventing_service()) {
3154
+ SKIP("cluster does not have eventing service");
3087
3155
  }
3088
3156
 
3089
3157
  if (!integration.cluster_version().supports_gcccp()) {
@@ -31,6 +31,10 @@ TEST_CASE("integration: trivial non-data query", "[integration]")
31
31
  {
32
32
  test::utils::integration_test_guard integration;
33
33
 
34
+ if (!integration.cluster_version().supports_query()) {
35
+ SKIP("cluster does not support query");
36
+ }
37
+
34
38
  if (!integration.cluster_version().supports_gcccp()) {
35
39
  test::utils::open_bucket(integration.cluster, integration.ctx.bucket);
36
40
  }
@@ -46,6 +50,10 @@ TEST_CASE("integration: query with handler capturing non-copyable object", "[int
46
50
  {
47
51
  test::utils::integration_test_guard integration;
48
52
 
53
+ if (!integration.cluster_version().supports_query()) {
54
+ SKIP("cluster does not support query");
55
+ }
56
+
49
57
  test::utils::open_bucket(integration.cluster, integration.ctx.bucket);
50
58
 
51
59
  if (!integration.cluster_version().supports_gcccp()) {
@@ -70,9 +78,14 @@ TEST_CASE("integration: query with handler capturing non-copyable object", "[int
70
78
  TEST_CASE("integration: query on a collection", "[integration]")
71
79
  {
72
80
  test::utils::integration_test_guard integration;
81
+
82
+ if (!integration.cluster_version().supports_query()) {
83
+ SKIP("cluster does not support query");
84
+ }
73
85
  if (!integration.cluster_version().supports_collections()) {
74
- return;
86
+ SKIP("cluster does not support collections");
75
87
  }
88
+
76
89
  test::utils::open_bucket(integration.cluster, integration.ctx.bucket);
77
90
 
78
91
  auto scope_name = test::utils::uniq_id("scope");
@@ -109,7 +122,7 @@ TEST_CASE("integration: query on a collection", "[integration]")
109
122
  req.index_name = index_name;
110
123
  req.is_primary = true;
111
124
  auto resp = test::utils::execute(integration.cluster, req);
112
- INFO(resp.ctx.http_body)
125
+ INFO(resp.ctx.http_body);
113
126
  REQUIRE_SUCCESS(resp.ctx.ec);
114
127
  }
115
128
 
@@ -172,6 +185,10 @@ TEST_CASE("integration: read only with no results", "[integration]")
172
185
  {
173
186
  test::utils::integration_test_guard integration;
174
187
 
188
+ if (!integration.cluster_version().supports_query()) {
189
+ SKIP("cluster does not support query");
190
+ }
191
+
175
192
  if (!integration.cluster_version().supports_gcccp()) {
176
193
  test::utils::open_bucket(integration.cluster, integration.ctx.bucket);
177
194
  }
@@ -188,6 +205,10 @@ TEST_CASE("integration: invalid query", "[integration]")
188
205
  {
189
206
  test::utils::integration_test_guard integration;
190
207
 
208
+ if (!integration.cluster_version().supports_query()) {
209
+ SKIP("cluster does not support query");
210
+ }
211
+
191
212
  if (!integration.cluster_version().supports_gcccp()) {
192
213
  test::utils::open_bucket(integration.cluster, integration.ctx.bucket);
193
214
  }
@@ -199,12 +220,16 @@ TEST_CASE("integration: invalid query", "[integration]")
199
220
  }
200
221
  }
201
222
 
202
- TEST_CASE("integration: preserve expiry for mutatation query", "[integration]")
223
+ TEST_CASE("integration: preserve expiry for mutation query", "[integration]")
203
224
  {
204
225
  test::utils::integration_test_guard integration;
205
226
 
227
+ if (!integration.cluster_version().supports_query()) {
228
+ SKIP("cluster does not support query");
229
+ }
230
+
206
231
  if (!integration.cluster_version().supports_preserve_expiry_for_query()) {
207
- return;
232
+ SKIP("cluster does not support support preserve expiry for query");
208
233
  }
209
234
 
210
235
  test::utils::open_bucket(integration.cluster, integration.ctx.bucket);
@@ -264,6 +289,10 @@ TEST_CASE("integration: streaming query results", "[integration]")
264
289
  {
265
290
  test::utils::integration_test_guard integration;
266
291
 
292
+ if (!integration.cluster_version().supports_query()) {
293
+ SKIP("cluster does not support query");
294
+ }
295
+
267
296
  if (!integration.cluster_version().supports_gcccp()) {
268
297
  test::utils::open_bucket(integration.cluster, integration.ctx.bucket);
269
298
  }
@@ -286,6 +315,10 @@ TEST_CASE("integration: streaming query results with stop in the middle", "[inte
286
315
  {
287
316
  test::utils::integration_test_guard integration;
288
317
 
318
+ if (!integration.cluster_version().supports_query()) {
319
+ SKIP("cluster does not support query");
320
+ }
321
+
289
322
  if (!integration.cluster_version().supports_gcccp()) {
290
323
  test::utils::open_bucket(integration.cluster, integration.ctx.bucket);
291
324
  }
@@ -315,8 +348,11 @@ TEST_CASE("integration: streaming analytics results", "[integration]")
315
348
  {
316
349
  test::utils::integration_test_guard integration;
317
350
 
318
- if (!integration.cluster_version().supports_analytics() || !integration.has_analytics_service()) {
319
- return;
351
+ if (!integration.cluster_version().supports_analytics()) {
352
+ SKIP("cluster does not support analytics");
353
+ }
354
+ if (!integration.has_analytics_service()) {
355
+ SKIP("cluster does not have analytics service");
320
356
  }
321
357
 
322
358
  if (!integration.cluster_version().supports_gcccp()) {
@@ -345,6 +381,10 @@ TEST_CASE("integration: sticking query to the service node", "[integration]")
345
381
  {
346
382
  test::utils::integration_test_guard integration;
347
383
 
384
+ if (!integration.cluster_version().supports_query()) {
385
+ SKIP("cluster does not support query");
386
+ }
387
+
348
388
  if (!integration.cluster_version().supports_gcccp()) {
349
389
  test::utils::open_bucket(integration.cluster, integration.ctx.bucket);
350
390
  }
@@ -412,10 +452,16 @@ TEST_CASE("analytics create dataset")
412
452
  {
413
453
  test::utils::integration_test_guard integration;
414
454
 
415
- if (!integration.cluster_version().supports_analytics() || !integration.has_analytics_service() ||
416
- !integration.cluster_version().supports_collections()) {
417
- return;
455
+ if (!integration.cluster_version().supports_analytics()) {
456
+ SKIP("cluster does not support analytics");
457
+ }
458
+ if (!integration.cluster_version().supports_collections()) {
459
+ SKIP("cluster does not support collections");
460
+ }
461
+ if (!integration.has_analytics_service()) {
462
+ SKIP("cluster does not have analytics service");
418
463
  }
464
+
419
465
  if (!integration.cluster_version().supports_gcccp()) {
420
466
  test::utils::open_bucket(integration.cluster, integration.ctx.bucket);
421
467
  }
@@ -434,6 +480,11 @@ TEST_CASE("analytics create dataset")
434
480
  TEST_CASE("integration: prepared query", "[integration]")
435
481
  {
436
482
  test::utils::integration_test_guard integration;
483
+
484
+ if (!integration.cluster_version().supports_query()) {
485
+ SKIP("cluster does not support query");
486
+ }
487
+
437
488
  test::utils::open_bucket(integration.cluster, integration.ctx.bucket);
438
489
  auto key = test::utils::uniq_id("foo");
439
490
  tao::json::value value = {
@@ -468,6 +519,10 @@ TEST_CASE("integration: query with public API", "[integration]")
468
519
  {
469
520
  test::utils::integration_test_guard integration;
470
521
 
522
+ if (!integration.cluster_version().supports_query()) {
523
+ SKIP("cluster does not support query");
524
+ }
525
+
471
526
  if (!integration.cluster_version().supports_gcccp()) {
472
527
  test::utils::open_bucket(integration.cluster, integration.ctx.bucket);
473
528
  }
@@ -505,8 +560,11 @@ TEST_CASE("integration: query from scope with public API", "[integration]")
505
560
  {
506
561
  test::utils::integration_test_guard integration;
507
562
 
563
+ if (!integration.cluster_version().supports_query()) {
564
+ SKIP("cluster does not support query");
565
+ }
508
566
  if (!integration.cluster_version().supports_collections()) {
509
- return;
567
+ SKIP("cluster does not support collections");
510
568
  }
511
569
 
512
570
  if (!integration.cluster_version().supports_gcccp()) {