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.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/ext/couchbase/CMakeLists.txt +59 -7
- data/ext/couchbase/cmake/Documentation.cmake +0 -1
- data/ext/couchbase/cmake/OpenSSL.cmake +98 -3
- data/ext/couchbase/cmake/Testing.cmake +12 -4
- data/ext/couchbase/cmake/ThirdPartyDependencies.cmake +4 -0
- data/ext/couchbase/cmake/build_config.hxx.in +3 -0
- data/ext/couchbase/core/bucket.cxx +3 -2
- data/ext/couchbase/core/bucket.hxx +9 -0
- data/ext/couchbase/core/cluster.hxx +17 -0
- data/ext/couchbase/core/cluster_options.cxx +2 -2
- data/ext/couchbase/core/cluster_options.hxx +4 -7
- data/ext/couchbase/core/{config_profile.cxx → cluster_options_fwd.hxx} +7 -6
- data/ext/couchbase/core/config_profile.hxx +2 -65
- data/ext/couchbase/core/config_profiles.cxx +79 -0
- data/ext/couchbase/core/config_profiles.hxx +56 -0
- data/ext/couchbase/core/error_context/search.hxx +1 -1
- data/ext/couchbase/core/impl/analytics.cxx +237 -0
- data/ext/couchbase/core/impl/boolean_field_query.cxx +40 -0
- data/ext/couchbase/core/impl/boolean_query.cxx +62 -0
- data/ext/couchbase/core/impl/cluster.cxx +2 -1
- data/ext/couchbase/core/impl/conjunction_query.cxx +51 -0
- data/ext/couchbase/core/impl/date_range.cxx +89 -0
- data/ext/couchbase/core/impl/date_range_facet.cxx +54 -0
- data/ext/couchbase/core/impl/date_range_facet_result.cxx +64 -0
- data/ext/couchbase/core/impl/date_range_query.cxx +125 -0
- data/ext/couchbase/core/impl/disjunction_query.cxx +51 -0
- data/ext/couchbase/core/impl/dns_srv_tracker.cxx +5 -3
- data/ext/couchbase/core/impl/encoded_search_facet.hxx +29 -0
- data/ext/couchbase/core/impl/encoded_search_query.hxx +29 -0
- data/ext/couchbase/core/impl/encoded_search_sort.hxx +29 -0
- data/ext/couchbase/core/impl/geo_bounding_box_query.cxx +46 -0
- data/ext/couchbase/core/impl/geo_distance_query.cxx +43 -0
- data/ext/couchbase/core/impl/geo_polygon_query.cxx +46 -0
- data/ext/couchbase/core/impl/internal_date_range_facet_result.cxx +80 -0
- data/ext/couchbase/core/impl/internal_date_range_facet_result.hxx +48 -0
- data/ext/couchbase/core/impl/internal_numeric_range_facet_result.cxx +80 -0
- data/ext/couchbase/core/impl/internal_numeric_range_facet_result.hxx +48 -0
- data/ext/couchbase/core/impl/internal_search_error_context.cxx +141 -0
- data/ext/couchbase/core/impl/internal_search_error_context.hxx +61 -0
- data/ext/couchbase/core/impl/internal_search_meta_data.cxx +60 -0
- data/ext/couchbase/core/impl/internal_search_meta_data.hxx +41 -0
- data/ext/couchbase/core/impl/internal_search_result.cxx +84 -0
- data/ext/couchbase/core/impl/internal_search_result.hxx +43 -0
- data/ext/couchbase/core/impl/internal_search_row.cxx +82 -0
- data/ext/couchbase/core/impl/internal_search_row.hxx +56 -0
- data/ext/couchbase/core/impl/internal_search_row_location.hxx +32 -0
- data/ext/couchbase/core/impl/internal_search_row_locations.cxx +137 -0
- data/ext/couchbase/core/impl/internal_search_row_locations.hxx +45 -0
- data/ext/couchbase/core/impl/internal_term_facet_result.cxx +80 -0
- data/ext/couchbase/core/impl/internal_term_facet_result.hxx +48 -0
- data/ext/couchbase/core/impl/match_all_query.cxx +35 -0
- data/ext/couchbase/core/impl/match_none_query.cxx +35 -0
- data/ext/couchbase/core/impl/match_phrase_query.cxx +43 -0
- data/ext/couchbase/core/impl/match_query.cxx +59 -0
- data/ext/couchbase/core/impl/numeric_range.cxx +49 -0
- data/ext/couchbase/core/impl/numeric_range_facet.cxx +54 -0
- data/ext/couchbase/core/impl/numeric_range_facet_result.cxx +64 -0
- data/ext/couchbase/core/impl/numeric_range_query.cxx +56 -0
- data/ext/couchbase/core/impl/phrase_query.cxx +42 -0
- data/ext/couchbase/core/impl/prefix_query.cxx +40 -0
- data/ext/couchbase/core/impl/query.cxx +5 -5
- data/ext/couchbase/core/impl/query_string_query.cxx +37 -0
- data/ext/couchbase/core/impl/regexp_query.cxx +40 -0
- data/ext/couchbase/core/impl/search.cxx +191 -0
- data/ext/couchbase/core/impl/search_error_context.cxx +147 -0
- data/ext/couchbase/core/impl/search_meta_data.cxx +46 -0
- data/ext/couchbase/core/impl/search_result.cxx +66 -0
- data/ext/couchbase/core/impl/search_row.cxx +74 -0
- data/ext/couchbase/core/impl/search_row_location.cxx +64 -0
- data/ext/couchbase/core/impl/search_row_locations.cxx +66 -0
- data/ext/couchbase/core/impl/search_sort_field.cxx +104 -0
- data/ext/couchbase/core/impl/search_sort_id.cxx +43 -0
- data/ext/couchbase/core/impl/search_sort_score.cxx +43 -0
- data/ext/couchbase/core/impl/term_facet.cxx +36 -0
- data/ext/couchbase/core/impl/term_facet_result.cxx +64 -0
- data/ext/couchbase/core/impl/term_query.cxx +56 -0
- data/ext/couchbase/core/impl/term_range_query.cxx +57 -0
- data/ext/couchbase/core/impl/wildcard_query.cxx +40 -0
- data/ext/couchbase/core/io/dns_client.cxx +225 -0
- data/ext/couchbase/core/io/dns_client.hxx +19 -188
- data/ext/couchbase/core/io/http_context.hxx +1 -1
- data/ext/couchbase/core/io/http_session.hxx +10 -0
- data/ext/couchbase/core/io/http_session_manager.hxx +5 -3
- data/ext/couchbase/core/io/mcbp_session.cxx +28 -1
- data/ext/couchbase/core/io/retry_orchestrator.hxx +3 -2
- data/ext/couchbase/core/json_string.hxx +5 -0
- data/ext/couchbase/core/meta/version.cxx +18 -4
- data/ext/couchbase/core/mozilla_ca_bundle.hxx +39 -0
- data/ext/couchbase/core/operations/document_analytics.cxx +1 -0
- data/ext/couchbase/core/operations/document_analytics.hxx +1 -0
- data/ext/couchbase/core/operations/document_append.hxx +1 -1
- data/ext/couchbase/core/operations/document_decrement.hxx +1 -1
- data/ext/couchbase/core/operations/document_exists.hxx +1 -1
- data/ext/couchbase/core/operations/document_get.hxx +1 -1
- data/ext/couchbase/core/operations/document_get_and_lock.hxx +1 -1
- data/ext/couchbase/core/operations/document_get_and_touch.hxx +1 -1
- data/ext/couchbase/core/operations/document_get_projected.hxx +1 -1
- data/ext/couchbase/core/operations/document_increment.hxx +1 -1
- data/ext/couchbase/core/operations/document_insert.hxx +1 -1
- data/ext/couchbase/core/operations/document_lookup_in.hxx +1 -1
- data/ext/couchbase/core/operations/document_mutate_in.hxx +1 -1
- data/ext/couchbase/core/operations/document_prepend.hxx +1 -1
- data/ext/couchbase/core/operations/document_query.cxx +2 -0
- data/ext/couchbase/core/operations/document_query.hxx +6 -0
- data/ext/couchbase/core/operations/document_remove.hxx +1 -1
- data/ext/couchbase/core/operations/document_replace.hxx +1 -1
- data/ext/couchbase/core/operations/document_search.cxx +4 -1
- data/ext/couchbase/core/operations/document_search.hxx +2 -1
- data/ext/couchbase/core/operations/document_touch.hxx +1 -1
- data/ext/couchbase/core/operations/document_unlock.hxx +1 -1
- data/ext/couchbase/core/operations/document_upsert.hxx +1 -1
- data/ext/couchbase/core/operations/document_view.hxx +1 -0
- data/ext/couchbase/core/protocol/client_request.hxx +11 -2
- data/ext/couchbase/core/public_fwd.hxx +21 -0
- data/ext/couchbase/core/tls_verify_mode.hxx +26 -0
- data/ext/couchbase/core/topology/configuration.cxx +15 -2
- data/ext/couchbase/core/topology/configuration.hxx +5 -1
- data/ext/couchbase/core/transactions/active_transaction_record.hxx +2 -2
- data/ext/couchbase/core/transactions/attempt_context_impl.cxx +3 -0
- data/ext/couchbase/core/transactions/attempt_context_impl.hxx +1 -1
- data/ext/couchbase/core/transactions/attempt_context_testing_hooks.cxx +93 -0
- data/ext/couchbase/core/transactions/attempt_context_testing_hooks.hxx +48 -75
- data/ext/couchbase/core/transactions/cleanup_testing_hooks.cxx +52 -0
- data/ext/couchbase/core/transactions/cleanup_testing_hooks.hxx +17 -31
- data/ext/couchbase/core/transactions/exceptions.hxx +12 -9
- data/ext/couchbase/core/transactions/internal/transaction_context.hxx +12 -12
- data/ext/couchbase/core/transactions/internal/transactions_cleanup.hxx +7 -1
- data/ext/couchbase/core/transactions/transaction_context.cxx +1 -0
- data/ext/couchbase/core/transactions/transactions_cleanup.cxx +144 -155
- data/ext/couchbase/core/utils/connection_string.cxx +27 -3
- data/ext/couchbase/core/utils/connection_string.hxx +3 -3
- data/ext/couchbase/core/utils/json.cxx +4 -1
- data/ext/couchbase/couchbase/analytics_error_context.hxx +143 -0
- data/ext/couchbase/couchbase/analytics_meta_data.hxx +155 -0
- data/ext/couchbase/couchbase/analytics_metrics.hxx +163 -0
- data/ext/couchbase/couchbase/analytics_options.hxx +359 -0
- data/ext/couchbase/couchbase/analytics_result.hxx +102 -0
- data/ext/couchbase/couchbase/analytics_scan_consistency.hxx +46 -0
- data/ext/couchbase/couchbase/analytics_status.hxx +41 -0
- data/ext/couchbase/couchbase/analytics_warning.hxx +85 -0
- data/ext/couchbase/couchbase/behavior_options.hxx +10 -1
- data/ext/couchbase/couchbase/boolean_field_query.hxx +77 -0
- data/ext/couchbase/couchbase/boolean_query.hxx +223 -0
- data/ext/couchbase/couchbase/cluster.hxx +75 -1
- data/ext/couchbase/couchbase/conjunction_query.hxx +88 -0
- data/ext/couchbase/couchbase/date_range.hxx +69 -0
- data/ext/couchbase/couchbase/date_range_facet.hxx +56 -0
- data/ext/couchbase/couchbase/date_range_facet_result.hxx +55 -0
- data/ext/couchbase/couchbase/date_range_query.hxx +265 -0
- data/ext/couchbase/couchbase/disjunction_query.hxx +109 -0
- data/ext/couchbase/couchbase/doc_id_query.hxx +111 -0
- data/ext/couchbase/couchbase/error_context.hxx +7 -6
- data/ext/couchbase/couchbase/fmt/analytics_scan_consistency.hxx +52 -0
- data/ext/couchbase/couchbase/fmt/analytics_status.hxx +76 -0
- data/ext/couchbase/couchbase/fmt/search_scan_consistency.hxx +49 -0
- data/ext/couchbase/couchbase/geo_bounding_box_query.hxx +107 -0
- data/ext/couchbase/couchbase/geo_distance_query.hxx +109 -0
- data/ext/couchbase/couchbase/geo_point.hxx +32 -0
- data/ext/couchbase/couchbase/geo_polygon_query.hxx +85 -0
- data/ext/couchbase/couchbase/highlight_style.hxx +45 -0
- data/ext/couchbase/couchbase/match_all_query.hxx +43 -0
- data/ext/couchbase/couchbase/match_none_query.hxx +43 -0
- data/ext/couchbase/couchbase/match_operator.hxx +45 -0
- data/ext/couchbase/couchbase/match_phrase_query.hxx +108 -0
- data/ext/couchbase/couchbase/match_query.hxx +163 -0
- data/ext/couchbase/couchbase/numeric_range.hxx +58 -0
- data/ext/couchbase/couchbase/numeric_range_facet.hxx +56 -0
- data/ext/couchbase/couchbase/numeric_range_facet_result.hxx +55 -0
- data/ext/couchbase/couchbase/numeric_range_query.hxx +143 -0
- data/ext/couchbase/couchbase/phrase_query.hxx +93 -0
- data/ext/couchbase/couchbase/prefix_query.hxx +82 -0
- data/ext/couchbase/couchbase/query_options.hxx +0 -1
- data/ext/couchbase/couchbase/query_string_query.hxx +72 -0
- data/ext/couchbase/couchbase/regexp_query.hxx +82 -0
- data/ext/couchbase/couchbase/scope.hxx +73 -0
- data/ext/couchbase/couchbase/search_date_range.hxx +68 -0
- data/ext/couchbase/couchbase/search_error_context.hxx +138 -0
- data/ext/couchbase/couchbase/search_facet.hxx +60 -0
- data/ext/couchbase/couchbase/search_facet_result.hxx +50 -0
- data/ext/couchbase/couchbase/search_meta_data.hxx +85 -0
- data/ext/couchbase/couchbase/search_metrics.hxx +127 -0
- data/ext/couchbase/couchbase/search_numeric_range.hxx +69 -0
- data/ext/couchbase/couchbase/search_options.hxx +509 -0
- data/ext/couchbase/couchbase/search_query.hxx +69 -0
- data/ext/couchbase/couchbase/search_result.hxx +77 -0
- data/ext/couchbase/couchbase/search_row.hxx +104 -0
- data/ext/couchbase/couchbase/search_row_location.hxx +55 -0
- data/ext/couchbase/couchbase/search_row_locations.hxx +86 -0
- data/ext/couchbase/couchbase/search_scan_consistency.hxx +34 -0
- data/ext/couchbase/couchbase/search_sort.hxx +58 -0
- data/ext/couchbase/couchbase/search_sort_field.hxx +117 -0
- data/ext/couchbase/couchbase/search_sort_field_missing.hxx +26 -0
- data/ext/couchbase/couchbase/search_sort_field_mode.hxx +27 -0
- data/ext/couchbase/couchbase/search_sort_field_type.hxx +28 -0
- data/ext/couchbase/couchbase/search_sort_id.hxx +60 -0
- data/ext/couchbase/couchbase/search_sort_score.hxx +60 -0
- data/ext/couchbase/couchbase/search_term_range.hxx +51 -0
- data/ext/couchbase/couchbase/security_options.hxx +3 -0
- data/ext/couchbase/couchbase/term_facet.hxx +48 -0
- data/ext/couchbase/couchbase/term_facet_result.hxx +55 -0
- data/ext/couchbase/couchbase/term_query.hxx +151 -0
- data/ext/couchbase/couchbase/term_range_query.hxx +142 -0
- data/ext/couchbase/couchbase/tracing/request_span.hxx +63 -0
- data/ext/couchbase/couchbase/tracing/request_tracer.hxx +2 -40
- data/ext/couchbase/couchbase/transactions/async_attempt_context.hxx +83 -4
- data/ext/couchbase/couchbase/transactions/attempt_context.hxx +68 -1
- data/ext/couchbase/couchbase/transactions/transaction_get_result.hxx +2 -0
- data/ext/couchbase/couchbase/transactions/transaction_keyspace.hxx +11 -1
- data/ext/couchbase/couchbase/transactions/transaction_options.hxx +79 -8
- data/ext/couchbase/couchbase/transactions/transaction_query_options.hxx +128 -15
- data/ext/couchbase/couchbase/transactions/transaction_query_result.hxx +4 -0
- data/ext/couchbase/couchbase/transactions/transaction_result.hxx +1 -1
- data/ext/couchbase/couchbase/transactions/transactions_cleanup_config.hxx +5 -3
- data/ext/couchbase/couchbase/transactions/transactions_config.hxx +9 -5
- data/ext/couchbase/couchbase/transactions/transactions_query_config.hxx +6 -3
- data/ext/couchbase/couchbase/transactions.hxx +34 -1
- data/ext/couchbase/couchbase/wildcard_query.hxx +83 -0
- data/ext/couchbase/test/CMakeLists.txt +8 -7
- data/ext/couchbase/test/benchmark_helper_integration.hxx +2 -2
- data/ext/couchbase/test/test_helper.hxx +6 -6
- data/ext/couchbase/test/test_integration_analytics.cxx +314 -16
- data/ext/couchbase/test/test_integration_collections.cxx +7 -3
- data/ext/couchbase/test/test_integration_connect.cxx +7 -3
- data/ext/couchbase/test/test_integration_crud.cxx +19 -2
- data/ext/couchbase/test/test_integration_diagnostics.cxx +11 -5
- data/ext/couchbase/test/test_integration_durability.cxx +12 -7
- data/ext/couchbase/test/test_integration_examples.cxx +324 -11
- data/ext/couchbase/test/test_integration_management.cxx +162 -94
- data/ext/couchbase/test/test_integration_query.cxx +68 -10
- data/ext/couchbase/test/test_integration_range_scan.cxx +12 -12
- data/ext/couchbase/test/test_integration_read_replica.cxx +48 -11
- data/ext/couchbase/test/test_integration_search.cxx +621 -0
- data/ext/couchbase/test/test_integration_subdoc.cxx +62 -11
- data/ext/couchbase/test/test_integration_tracer.cxx +5 -0
- data/ext/couchbase/test/test_integration_transcoders.cxx +13 -5
- data/ext/couchbase/test/{test_transaction_transaction_context.cxx → test_transaction_context.cxx} +1 -1
- data/ext/couchbase/test/test_transaction_examples.cxx +195 -0
- data/ext/couchbase/test/{test_transaction_transaction_simple.cxx → test_transaction_simple.cxx} +90 -5
- data/ext/couchbase/test/{test_transaction_transaction_simple_async.cxx → test_transaction_simple_async.cxx} +19 -21
- data/ext/couchbase/test/test_unit_config_profiles.cxx +13 -13
- data/ext/couchbase/test/test_unit_connection_string.cxx +35 -0
- data/ext/couchbase/test/test_unit_json_transcoder.cxx +4 -0
- data/ext/couchbase/test/test_unit_search.cxx +427 -0
- data/ext/couchbase/test/test_unit_transaction_utils.cxx +10 -1
- data/ext/couchbase/test/test_unit_utils.cxx +8 -4
- data/ext/couchbase/third_party/snappy/CMakeLists.txt +150 -27
- data/ext/couchbase/third_party/snappy/cmake/config.h.in +28 -24
- data/ext/couchbase/third_party/snappy/snappy-internal.h +189 -25
- data/ext/couchbase/third_party/snappy/snappy-sinksource.cc +26 -9
- data/ext/couchbase/third_party/snappy/snappy-sinksource.h +11 -11
- data/ext/couchbase/third_party/snappy/snappy-stubs-internal.cc +1 -1
- data/ext/couchbase/third_party/snappy/snappy-stubs-internal.h +227 -308
- data/ext/couchbase/third_party/snappy/snappy-stubs-public.h.in +0 -11
- data/ext/couchbase/third_party/snappy/snappy.cc +1176 -410
- data/ext/couchbase/third_party/snappy/snappy.h +19 -4
- data/ext/couchbase.cxx +85 -22
- data/ext/revisions.rb +3 -3
- data/lib/couchbase/authenticator.rb +0 -1
- data/lib/couchbase/cluster.rb +13 -13
- data/lib/couchbase/cluster_registry.rb +7 -2
- data/lib/couchbase/config_profiles.rb +1 -1
- data/lib/couchbase/configuration.rb +3 -4
- data/lib/couchbase/json_transcoder.rb +12 -5
- data/lib/couchbase/management/collection_query_index_manager.rb +54 -15
- data/lib/couchbase/management/query_index_manager.rb +70 -5
- data/lib/couchbase/options.rb +85 -2
- data/lib/couchbase/raw_binary_transcoder.rb +37 -0
- data/lib/couchbase/raw_json_transcoder.rb +38 -0
- data/lib/couchbase/raw_string_transcoder.rb +40 -0
- data/lib/couchbase/search_options.rb +163 -240
- data/lib/couchbase/transcoder_flags.rb +62 -0
- data/lib/couchbase/version.rb +1 -1
- metadata +151 -12
- data/ext/couchbase/core/CMakeLists.txt +0 -0
- /data/ext/couchbase/test/{test_transaction_transaction_public_async_api.cxx → test_transaction_public_async_api.cxx} +0 -0
- /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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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()
|
|
961
|
-
|
|
962
|
-
|
|
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
|
-
|
|
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()
|
|
1960
|
-
|
|
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
|
-
|
|
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().
|
|
2492
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
2924
|
-
|
|
2925
|
-
{
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
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
|
-
|
|
2970
|
-
|
|
2971
|
-
{
|
|
2972
|
-
|
|
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
|
-
|
|
3006
|
-
|
|
3007
|
-
{
|
|
3008
|
-
|
|
3059
|
+
SECTION("create scope")
|
|
3060
|
+
{
|
|
3061
|
+
if (!integration.cluster_version().supports_collections()) {
|
|
3062
|
+
SKIP("cluster does not support collections");
|
|
3063
|
+
}
|
|
3009
3064
|
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
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
|
-
|
|
3028
|
-
|
|
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()
|
|
3086
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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()
|
|
319
|
-
|
|
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()
|
|
416
|
-
|
|
417
|
-
|
|
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
|
-
|
|
567
|
+
SKIP("cluster does not support collections");
|
|
510
568
|
}
|
|
511
569
|
|
|
512
570
|
if (!integration.cluster_version().supports_gcccp()) {
|